/* ============================================================
   Faith In Mercy — faithinmercy.org
   Palette: Navy #1E3A5F · Cream #F5F1E8 · Gold #B8860B · Sage #7A9471
   Type:    Georgia (serif) · Helvetica (sans) — system fonts
   ============================================================ */

:root {
  --navy: #1E3A5F;
  --navy-deep: #16293F;
  --cream: #F5F1E8;
  --cream-soft: #FBF9F3;
  --gold: #B8860B;
  --sage: #7A9471;
  --ink: #24303E;
  --hairline: #E2DAC6;
  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(30, 58, 95, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--navy); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 720px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 241, 232, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.header-inner {
  max-width: 1080px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--navy);
}
.brand-cross { width: 26px; height: 26px; color: var(--navy); }
.brand-name {
  font-family: var(--font-serif);
  font-size: 1.15rem; letter-spacing: 0.06em;
}
#site-nav { display: flex; gap: 26px; }
#site-nav a {
  text-decoration: none; color: var(--ink);
  font-size: 0.92rem; letter-spacing: 0.02em;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
#site-nav a:hover, #site-nav a:focus-visible { color: var(--navy); border-bottom-color: var(--gold); }

.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 8px; flex-direction: column; gap: 5px;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--navy); transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 96px 24px 104px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, #FBF8F0 0%, var(--cream) 70%);
}
.hero-cross { width: 58px; height: 58px; margin: 0 auto 26px; }
.hero h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  line-height: 1.1;
}
.hero h1 .in {
  font-family: var(--font-sans);
  font-size: 0.38em;
  letter-spacing: 0.35em;
  color: var(--gold);
  vertical-align: 0.28em;
  padding: 0 0.6em;
}
.tagline {
  margin-top: 18px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  color: var(--gold);
}
.hero-sub {
  max-width: 560px;
  margin: 16px auto 0;
  color: #4A5568;
  font-size: 1.02rem;
}
.hero-actions { margin-top: 36px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  padding: 14px 30px;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s, color 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: var(--cream); }
.btn-primary:hover { background: var(--navy-deep); box-shadow: var(--shadow); }
.btn-ghost { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-ghost:hover { background: rgba(30, 58, 95, 0.06); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #9C720A; box-shadow: 0 10px 30px rgba(0,0,0,0.18); }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.eyebrow-light { color: #D9B44A; }
h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  color: var(--navy);
  margin-bottom: 16px;
}
.lead { max-width: 640px; color: #4A5568; font-size: 1.05rem; margin-bottom: 40px; }
.section .wrap > .lead:last-of-type { margin-bottom: 44px; }

/* ---------- Cards ---------- */
.pillar-grid, .prayer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}
.card {
  background: var(--cream-soft);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.card:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.18rem;
  color: var(--navy);
  margin-bottom: 10px;
}
.card p { font-size: 0.95rem; color: #4A5568; }
.card-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.9rem;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.card-link:hover { text-decoration: underline; }

/* ---------- Today's Word ---------- */
.word-section {
  background: var(--navy);
  color: var(--cream);
  padding: 92px 0;
  text-align: center;
}
.word-section h2 { color: var(--cream); }
#verse-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  line-height: 1.4;
  color: #FDFBF5;
  transition: opacity 0.4s;
}
#verse-ref {
  display: block;
  margin-top: 20px;
  font-style: normal;
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: #D9B44A;
}
.word-actions { margin-top: 34px; }

/* ---------- Subscribe ---------- */
.subscribe { text-align: center; }
.subscribe .lead { margin-left: auto; margin-right: auto; }
#subscribe-form { max-width: 480px; margin: 0 auto; }
.form-row { display: flex; gap: 10px; }
.form-row input {
  flex: 1;
  min-width: 0;
  font: inherit;
  padding: 14px 16px;
  border: 1.5px solid var(--hairline);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}
.form-row input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.18); }
.form-row .btn { white-space: nowrap; }
.form-error { margin-top: 10px; color: #A63A2B; font-size: 0.9rem; }
.form-note { margin-top: 10px; font-size: 0.82rem; color: #7A8494; }
.form-success { margin: 26px auto 0; max-width: 480px; }
.form-success p {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--navy);
  background: var(--cream-soft);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 24px;
}

/* ---------- Connect ---------- */
.connect { text-align: center; }
.connect .lead { margin-left: auto; margin-right: auto; }
.social-row {
  display: flex; flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}
.social {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  width: 96px; padding: 16px 8px 12px;
  background: var(--cream-soft);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  text-decoration: none; color: var(--navy);
  font-size: 0.8rem; letter-spacing: 0.02em;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.social svg { width: 26px; height: 26px; }
.social:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: var(--shadow); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #C9D2DE; padding: 56px 0 34px; }
.footer-inner {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 32px; flex-wrap: wrap;
  padding: 0 24px;
  max-width: 1080px; margin: 0 auto;
}
.footer-cross { width: 22px; height: 22px; color: #D9B44A; margin-bottom: 10px; }
.footer-name { font-family: var(--font-serif); font-size: 1.15rem; letter-spacing: 0.06em; color: #F5F1E8; }
.footer-tag { font-family: var(--font-serif); font-style: italic; color: #9FB0C4; margin-top: 4px; }
.footer-nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-nav a { color: #C9D2DE; text-decoration: none; font-size: 0.92rem; }
.footer-nav a:hover { color: #fff; text-decoration: underline; }
.footer-legal {
  max-width: 1080px; margin: 40px auto 0; padding: 22px 24px 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.82rem; color: #8FA0B4;
}
.footer-legal a { color: #D9B44A; }
.footer-legal .fine { margin-top: 8px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: 28px;
  transform: translate(-50%, 16px);
  background: var(--navy);
  color: var(--cream);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 100;
  box-shadow: var(--shadow);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Focus visibility ---------- */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2.5px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  #site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--hairline);
    box-shadow: var(--shadow);
    max-height: 0; overflow: hidden;
    transition: max-height 0.3s ease;
  }
  #site-nav.open { max-height: 340px; }
  #site-nav a { padding: 14px 24px; border-bottom: 1px solid var(--hairline); }

  .hero { padding: 72px 20px 80px; }
  .section { padding: 64px 0; }
  .word-section { padding: 72px 0; }
  .form-row { flex-direction: column; }
  .form-row .btn { width: 100%; }
  .footer-inner { flex-direction: column; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
