/* Simply Christian Fellowship — shared styles */

:root {
  --teal: #418892;
  --teal-dark: #2f6b73;
  --teal-deep: #285c63;
  --cream: #faf7f0;
  --cream-2: #f3eee3;
  --paper: #fffdf8;
  --ink: #2c3335;
  --ink-soft: #55605f;
  --line: #e4ddce;
  --header-bg: rgba(250,247,240,.88);
  --footer-bg: #285c63;
  --footer-ink: #d6e7ea;
  --footer-muted: #a9c8cc;
  --sky-fade: 250,247,240;   /* rgb of --cream, for hero scrim gradient */
  --shadow: 0 1px 2px rgba(40,60,60,.04), 0 8px 30px rgba(40,60,60,.06);
  --serif: "Crimson Pro", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --maxread: 44rem;
}

/* ---------- Dark theme (opt-in, remembered) ---------- */
/* Softer "dusk" alternate theme — a warm deep teal, not near-black */
html[data-theme="dark"] {
  --teal: #5f9aa0;
  --teal-dark: #b7e2e6;
  --teal-deep: #d6eef0;
  --cream: #27444a;
  --cream-2: #2d4d53;
  --paper: #32545a;
  --ink: #f0f4ee;
  --ink-soft: #c4d6d5;
  --line: #436167;
  --header-bg: rgba(39,68,74,.90);
  --footer-bg: #203a40;
  --footer-ink: #e0edee;
  --footer-muted: #9db6b7;
  --sky-fade: 39,68,74;
  --shadow: 0 1px 2px rgba(0,0,0,.14), 0 10px 30px rgba(0,0,0,.22);
}

/* Color transition only when the user toggles, never on first paint */
html.theme-anim,
html.theme-anim body,
html.theme-anim .site-header,
html.theme-anim .card,
html.theme-anim .verse,
html.theme-anim .site-footer,
html.theme-anim .btn-ghost,
html.theme-anim main > section {
  transition: background-color .38s ease, color .38s ease, border-color .38s ease;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.22rem;
  line-height: 1.72;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--teal-dark); text-decoration-color: rgba(65,136,146,.35); text-underline-offset: 3px; }
a:hover { color: var(--teal-deep); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  max-width: 76rem; margin: 0 auto;
  display: flex; align-items: center; justify-content: flex-start;
  padding: .7rem 1.4rem; gap: 1.1rem;
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { width: 34px; height: auto; }
.brand span { font-family: var(--serif); font-weight: 600; font-size: 1.28rem; letter-spacing: .1px; color: var(--teal-dark); line-height: 1.05; }
.brand small { display:block; font-family: var(--sans); font-weight: 500; font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); }

.nav-links { display: flex; align-items: center; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-family: var(--sans); font-size: .82rem; font-weight: 500; letter-spacing: .02em;
  color: var(--ink-soft); text-decoration: none; padding: .5rem .7rem; border-radius: 8px;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--teal-dark); background: rgba(65,136,146,.08); }
.nav-links a.active { color: var(--teal-dark); background: rgba(65,136,146,.12); }

.nav-toggle {
  display: none; border: 1px solid var(--line); background: var(--paper);
  border-radius: 9px; padding: .45rem .6rem; cursor: pointer; color: var(--teal-dark);
}
.nav-toggle svg { display:block; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    padding: .5rem 1rem 1rem; box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .8rem .6rem; font-size: .95rem; border-radius: 8px; }
}

/* ---------- Layout ---------- */
.wrap { max-width: 76rem; margin: 0 auto; padding: 0 1.4rem; }
.read { max-width: var(--maxread); margin-left: auto; margin-right: auto; }

section { padding: 4.5rem 0; }
.section-tight { padding: 3rem 0; }

/* ---------- Typography ---------- */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--ink); line-height: 1.15; letter-spacing: -.01em; }
h1 { font-size: clamp(2.4rem, 5.5vw, 3.8rem); margin: 0 0 .4rem; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin: 0 0 1rem; }
h3 { font-size: 1.4rem; margin: 0 0 .5rem; }
p { margin: 0 0 1.15rem; }
.lead { font-size: 1.35rem; color: var(--ink-soft); }

.eyebrow {
  font-family: var(--sans); font-size: .72rem; font-weight: 600; letter-spacing: .2em;
  text-transform: uppercase; color: var(--teal); margin: 0 0 1rem;
}
.center { text-align: center; }
.divider-dove { display:block; width: 46px; margin: 2.5rem auto; opacity: .6; }

/* ---------- Fixed-layer parallax background ----------
   .hero-bg is a DIRECT CHILD OF <body>, pinned behind the whole page.
   The hero section is transparent so this shows through; every other
   section is opaque and scrolls up over this stationary image. */
.hero-bg {
  position: fixed; inset: 0; z-index: -1;
  background: var(--cream) url("hero-poster.jpg") center 42% / cover no-repeat;
}
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 70%;
}
/* Save data and respect motion preferences: show the still poster instead */
@media (prefers-reduced-motion: reduce) { .hero-video { display: none; } }
@media (max-width: 768px) { .hero-video { display: none; } }

/* Opaque sections cover the fixed background as you scroll */
main > section { background: var(--cream); }
main > section.band { background: var(--cream-2); }
main > section.band-paper { background: var(--paper); }

/* ---------- Hero ---------- */
.hero {
  text-align: center; padding: 6.5rem 0 5.5rem;
  background: transparent;          /* let the fixed sky show through */
  position: relative;
}
.hero-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(62% 58% at 50% 42%, rgba(255,253,248,.34), rgba(255,253,248,0) 72%),
    linear-gradient(to bottom, rgba(var(--sky-fade),.28) 0%, rgba(var(--sky-fade),.10) 42%, rgba(var(--sky-fade),.70) 86%, var(--cream) 100%);
}
.hero-content { position: relative; z-index: 1; }
.hero .dove-mark {
  width: 108px; margin: 0 auto 1.6rem; opacity: .97;
  filter: drop-shadow(0 8px 18px rgba(40,60,60,.22));
}
.hero h1 { color: var(--teal-dark); text-shadow: 0 1px 24px rgba(255,253,248,.7); }
.hero .tagline {
  font-family: var(--serif); font-style: italic; font-size: 1.55rem; font-weight: 500;
  letter-spacing: .01em; color: var(--teal-deep); margin: 0 auto 1.8rem; max-width: 36rem; line-height: 1.4;
}
.hero .lead { max-width: 40rem; margin: 0 auto 2rem; }
@media (max-width: 860px) { .hero { padding: 4.5rem 0 4rem; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-family: var(--sans); font-weight: 600; font-size: .9rem;
  letter-spacing: .02em; text-decoration: none; padding: .8rem 1.5rem; border-radius: 999px;
  transition: transform .12s, background .15s, box-shadow .15s; cursor: pointer;
}
.btn-primary { background: var(--teal); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--teal-dark); color:#fff; transform: translateY(-1px); }
.btn-ghost { color: var(--teal-dark); border: 1px solid var(--line); background: var(--paper); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal-deep); }
.btn-row { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; margin-top: .5rem; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.2rem; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  padding: 1.7rem 1.6rem; text-decoration: none; color: inherit; display: block;
  transition: transform .14s, box-shadow .14s, border-color .14s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgba(65,136,146,.4); }
.card h3 { color: var(--teal-dark); margin-bottom: .35rem; }
.card p { font-size: 1.02rem; color: var(--ink-soft); margin: 0; line-height: 1.55; }
.card .card-more { font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: .04em; color: var(--teal); margin-top: .9rem; display:inline-block; }

/* alternating band */
.band { background: var(--cream-2); }
.band-paper { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Article blocks ---------- */
.article h2 { margin-top: 2.6rem; }
.article h2:first-child { margin-top: 0; }
.article .sub { color: var(--teal-dark); font-family: var(--sans); font-weight:600; font-size:.75rem; letter-spacing:.16em; text-transform:uppercase; margin-bottom:.4rem; }

/* pull quote / scripture */
.quote {
  font-style: italic; font-size: 1.5rem; line-height: 1.5; color: var(--teal-dark);
  border-left: 3px solid var(--teal); padding: .3rem 0 .3rem 1.5rem; margin: 2rem 0;
}
.quote cite { display: block; font-style: normal; font-size: .82rem; font-family: var(--sans);
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin-top: .7rem; }

/* scripture grid */
.verses { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 1.1rem; }
.verse { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 1.4rem 1.5rem; }
.verse .ref { font-family: var(--sans); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin-bottom: .5rem; }
.verse p { font-style: italic; font-size: 1.08rem; line-height: 1.5; color: var(--ink); margin: 0; }

/* practice list */
.practice { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 1.1rem; }
.practice .card h3 { font-size: 1.22rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); }
.site-footer a { color: #eaf4f5; }
.footer-inner { max-width: 76rem; margin: 0 auto; padding: 3rem 1.4rem 2.4rem;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; }
.footer-inner .fbrand { display:flex; align-items:center; gap:.6rem; margin-bottom: .8rem; }
.footer-inner .fbrand img { width: 34px; }
.footer-inner .fbrand span { font-size: 1.2rem; font-weight: 600; color: #fff; }
.footer-inner p { color: #bfd8db; font-size: 1rem; line-height: 1.6; max-width: 30rem; }
.fnav { display: flex; flex-direction: column; gap: .5rem; }
.fnav a { font-family: var(--sans); font-size: .88rem; text-decoration: none; color: #cfe4e7; }
.fnav a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); }
.site-credit {
  text-align: center; margin: 0; padding: 0 1.4rem 1.5rem;
  font-family: var(--sans); font-size: .76rem; letter-spacing: .02em;
  color: rgba(214,231,234,.6);
}
.site-credit a { color: rgba(234,244,245,.82); text-decoration-color: rgba(234,244,245,.4); }
.site-credit a:hover { color: #fff; }
.footer-bottom .fb { max-width: 76rem; margin: 0 auto; padding: 1.2rem 1.4rem; display:flex; justify-content: space-between; flex-wrap: wrap; gap:.5rem;
  font-family: var(--sans); font-size: .78rem; color: #a9c8cc; }
@media (max-width: 640px){ .footer-inner { grid-template-columns: 1fr; } }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--teal-dark); color: #fff; padding: .7rem 1.1rem; border-radius: 0 0 10px 0;
  font-family: var(--sans); font-size: .85rem; font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ---------- Header logo + theme toggle ---------- */
.brand img { width: 40px; }              /* a touch larger, roomier header */
.nav { padding: .85rem 1.4rem; }
.logo-light { display: none; }
html[data-theme="dark"] .logo-dark { display: none; }
html[data-theme="dark"] .logo-light { display: inline-block; }

.header-tools { display: flex; align-items: center; gap: .35rem; }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--paper); color: var(--teal-dark);
  transition: background .15s, color .15s, border-color .15s;
}
.theme-toggle:hover { border-color: var(--teal); color: var(--teal-deep); }
.theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

@media (max-width: 860px) {
  .header-tools { margin-left: auto; }
}

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Blog: archive list ---------- */
.post-list { display: grid; gap: 1.1rem; max-width: 52rem; margin: 0 auto; }
.post-item {
  display: block; text-decoration: none; color: inherit;
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  padding: 1.5rem 1.7rem; transition: transform .14s, box-shadow .14s, border-color .14s;
}
.post-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgba(65,136,146,.4); }
.post-meta { font-family: var(--sans); font-size: .74rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--teal); margin: 0 0 .4rem; display: flex; gap: .7rem; flex-wrap: wrap; }
.post-meta .wk { color: var(--ink-soft); }
.post-item h3 { color: var(--teal-dark); margin: 0 0 .4rem; font-size: 1.5rem; }
.post-item p { margin: 0; color: var(--ink-soft); font-size: 1.05rem; line-height: 1.55; }

/* ---------- Blog: single post ---------- */
.post-head { text-align: center; max-width: 46rem; margin: 0 auto; }
.post-head .post-meta { justify-content: center; }
.post-body { max-width: var(--maxread); margin: 2.4rem auto 0; }
.post-body h2 { margin-top: 2.4rem; }

/* Devotional entry block */
.devotional {
  max-width: 40rem; margin: 0 auto; padding: 2.2rem 2rem; border-radius: 18px;
  background: var(--cream-2); border: 1px solid var(--line);
}
.devotional .dev-label { text-align: center; font-family: var(--sans); font-size: .72rem; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase; color: var(--teal); margin: 0 0 1.2rem; }
.dev-open, .dev-bless {
  text-align: center; font-style: italic; font-size: 1.2rem; line-height: 1.55; color: var(--teal-deep);
  margin: 1.2rem auto; max-width: 30rem;
}
html[data-theme="dark"] .dev-open, html[data-theme="dark"] .dev-bless { color: var(--teal-dark); }
.dev-open cite, .dev-bless cite { display: block; font-style: normal; font-family: var(--sans);
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin-top: .6rem; }
.dev-ornament { text-align: center; color: var(--teal); opacity: .6; font-size: 1.1rem; margin: .2rem 0 1rem; }
.dev-rule { border: none; border-top: 1px solid var(--line); max-width: 5rem; margin: 1.6rem auto; }
.dev-practice { margin: 1.4rem 0 0; }
.dev-practice b { color: var(--teal-dark); }

/* ---------- Newsletter signup ---------- */
.signup {
  max-width: 40rem; margin: 3rem auto 0; text-align: center;
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 2.2rem 2rem;
}
.signup h3 { color: var(--teal-dark); margin: 0 0 .5rem; }
.signup p { color: var(--ink-soft); margin: 0 0 1.3rem; font-size: 1.02rem; }
.signup-embed { min-height: 3rem; }
.signup-form { display: flex; gap: .6rem; max-width: 26rem; margin: 0 auto; flex-wrap: wrap; }
.signup-form input[type=email] {
  flex: 1 1 12rem; padding: .8rem 1rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--cream); color: var(--ink); font-family: var(--serif); font-size: 1rem;
}
.signup-note { font-family: var(--sans); font-size: .72rem; color: var(--ink-soft); margin: .9rem 0 0; }

/* Plain-language RSS help */
.rss-help { max-width: 34rem; margin: 1.4rem auto 0; text-align: left;
  border-top: 1px solid var(--line); padding-top: 1rem; }
.rss-help summary {
  cursor: pointer; list-style: none; text-align: center;
  font-family: var(--sans); font-size: .82rem; font-weight: 600; color: var(--teal-dark);
}
.rss-help summary::-webkit-details-marker { display: none; }
.rss-help summary::after { content: " ▾"; color: var(--teal); }
.rss-help[open] summary::after { content: " ▴"; }
.rss-help .rss-body { margin-top: 1rem; }
.rss-help p { font-size: .98rem; line-height: 1.6; color: var(--ink-soft); margin: 0 0 .8rem; }
.rss-help b { color: var(--ink); }
.rss-help code {
  display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .82rem; background: var(--cream-2); border: 1px solid var(--line);
  border-radius: 8px; padding: .35rem .6rem; margin-top: .2rem; word-break: break-all; color: var(--ink);
}
.rss-help ol { margin: 0 0 .8rem; padding-left: 1.2rem; }
.rss-help li { font-size: .98rem; line-height: 1.55; color: var(--ink-soft); margin-bottom: .3rem; }

/* ---------- Contact / prayer form ---------- */
.form-wrap { max-width: 40rem; margin: 0 auto; }
.field { margin-bottom: 1.1rem; text-align: left; }
.field label { display: block; font-family: var(--sans); font-size: .8rem; font-weight: 600;
  letter-spacing: .04em; color: var(--ink-soft); margin-bottom: .35rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: .8rem 1rem; border-radius: 12px; border: 1px solid var(--line);
  background: var(--paper); color: var(--ink); font-family: var(--serif); font-size: 1.05rem;
}
.field textarea { min-height: 9rem; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin-top: 1rem; font-family: var(--sans); font-size: .92rem; min-height: 1.2rem; }
.form-status.ok { color: var(--teal-dark); }
.form-status.err { color: #b3543f; }

/* misc */
.mt-0{margin-top:0}.mb-0{margin-bottom:0}
