/*
Theme Name: Miracles of Hope
Theme URI: https://miraclesofhope.com
Author: Kristin
Description: A lightweight, responsive classic theme for Miracles of Hope. Dark ink-navy header and footer, warm paper background, dawn-gold accent. Customizer-driven homepage hero with background image, intro text, and call-to-action button. No page builder required.
Version: 1.0.9
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: miracles-of-hope
*/

/* ==========================================================================
   1. Tokens
   ========================================================================== */
:root {
  --moh-ink: #1b2a41;        /* header / footer navy */
  --moh-ink-deep: #14202f;
  --moh-gold: #c9a227;       /* dawn gold accent */
  --moh-gold-soft: #e6c968;
  --moh-paper: #faf8f4;      /* warm page background */
  --moh-tint: #eef2f7;       /* alternate section tint */
  --moh-text: #2b2b2b;
  --moh-muted: #66707d;
  --moh-white: #ffffff;
  --moh-radius: 6px;
  --moh-shadow: 0 10px 30px rgba(20, 32, 47, 0.10);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1140px;
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--moh-text);
  background: var(--moh-paper);
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--moh-ink);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

a { color: var(--moh-ink); text-decoration-color: var(--moh-gold-soft); text-underline-offset: 3px; }
a:hover { color: var(--moh-gold-soft); }

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--moh-gold-soft);
  outline-offset: 2px;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px; width: 1px;
  overflow: hidden; position: absolute !important;
  word-wrap: normal !important;
}
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--moh-gold-soft); color: var(--moh-ink-deep);
  padding: 0.6rem 1rem; z-index: 1000; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ==========================================================================
   3. Buttons
   ========================================================================== */
.btn,
.wp-block-button__link {
  display: inline-block;
  background: var(--moh-gold-soft);
  color: var(--moh-ink-deep);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  padding: 0.85rem 1.9rem;
  border: 0;
  border-radius: var(--moh-radius);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.btn:hover, .wp-block-button__link:hover {
  background: var(--moh-gold-soft);
  color: var(--moh-ink-deep);
  transform: translateY(-2px);
}
.btn--ghost {
  background: transparent;
  color: var(--moh-white);
  box-shadow: inset 0 0 0 2px var(--moh-gold-soft);
}
.btn--ghost:hover { background: var(--moh-gold-soft); color: var(--moh-ink-deep); }

/* ==========================================================================
   4. Header
   ========================================================================== */
.site-header {
  background: var(--moh-ink);
  color: var(--moh-white);
  position: relative;
  z-index: 100;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 76px;
}
.site-branding { display: flex; align-items: center; gap: 0.75rem; }
.site-branding img.custom-logo { max-height: 52px; width: auto; }
.site-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0;
}
.site-title a { color: var(--moh-white); text-decoration: none; }
.site-title a:hover { color: var(--moh-gold-soft); }
.site-tagline {
  display: block;
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.65);
}

/* Primary nav */
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; }
.main-nav li { position: relative; }
.main-nav a {
  display: block;
  color: var(--moh-white);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.65rem 0.9rem;
  border-radius: var(--moh-radius);
}
.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a {
  color: var(--moh-gold-soft);
}
/* Dropdowns (desktop) */
.main-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  min-width: 220px;
  background: var(--moh-ink-deep);
  padding: 0.4rem;
  border-radius: var(--moh-radius);
  box-shadow: var(--moh-shadow);
  flex-direction: column;
}
.main-nav li:hover > .sub-menu,
.main-nav li:focus-within > .sub-menu { display: flex; }
.main-nav .sub-menu a { padding: 0.55rem 0.8rem; font-size: 0.92rem; }

/* Mobile toggle */
.nav-toggle {
  display: none;
  background: transparent;
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: var(--moh-radius);
  color: var(--moh-white);
  padding: 0.45rem 0.7rem;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 0.4rem; }
  .main-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--moh-ink-deep);
    display: none;
    padding: 0.75rem 1.25rem 1.25rem;
    box-shadow: var(--moh-shadow);
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a { padding: 0.8rem 0.5rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .main-nav .sub-menu {
    display: block;
    position: static;
    min-width: 0;
    background: transparent;
    box-shadow: none;
    padding: 0 0 0 1rem;
  }
}

/* ==========================================================================
   5. Hero (front page)
   ========================================================================== */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--moh-ink) 0%, #2c4160 100%);
  background-size: cover;
  background-position: center;
  color: var(--moh-white);
  text-align: center;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,32,47,0.72) 0%, rgba(20,32,47,0.55) 100%);
}
.hero .wrap {
  position: relative;
  padding-top: clamp(4.5rem, 12vw, 8.5rem);
  padding-bottom: clamp(4.5rem, 12vw, 8.5rem);
  max-width: 820px;
}
.hero-eyebrow {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--moh-gold-soft);
  margin: 0 0 1rem;
}
.hero h1 { color: var(--moh-white); margin-bottom: 0.4em; }
/* Signature: dawn line under the heading */
.hero h1::after {
  content: "";
  display: block;
  width: 96px; height: 2px;
  margin: 1.1rem auto 0;
  background: linear-gradient(90deg, transparent, var(--moh-gold-soft), transparent);
}
.hero-text {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: rgba(255,255,255,0.9);
  max-width: 640px;
  margin: 0 auto 2rem;
}
.hero .btn { font-size: 1.05rem; }

/* ==========================================================================
   6. Front-page sections
   ========================================================================== */
.section { padding: clamp(3rem, 8vw, 5.5rem) 0; }
.section--tint { background: var(--moh-tint); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 2.5rem; }
.section-head p { color: var(--moh-muted); margin: 0; }

/* Pillar cards */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.pillar {
  background: var(--moh-white);
  border-radius: var(--moh-radius);
  border-top: 3px solid var(--moh-gold-soft);
  box-shadow: var(--moh-shadow);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
}
.pillar h3 { margin-bottom: 0.4em; }
.pillar p { color: var(--moh-muted); flex: 1; margin: 0 0 1.25rem; }
.pillar-link {
  font-weight: 700;
  text-decoration: none;
  color: var(--moh-ink);
}
.pillar-link::after { content: " \2192"; color: var(--moh-gold-soft); }
.pillar-link:hover { color: var(--moh-gold-soft); }

@media (max-width: 860px) {
  .pillars { grid-template-columns: 1fr; }
}

/* Latest posts grid */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.post-card {
  background: var(--moh-white);
  border-radius: var(--moh-radius);
  overflow: hidden;
  box-shadow: var(--moh-shadow);
  display: flex;
  flex-direction: column;
}
.post-card-thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.post-card:hover .post-card-thumb img { transform: scale(1.04); }
.post-card-body { padding: 1.4rem 1.5rem 1.6rem; }
.post-card h3 { font-size: 1.3rem; }
.post-card h3 a { text-decoration: none; }
.post-card h3 a:hover { color: var(--moh-gold-soft); }
.post-meta { font-size: 0.85rem; color: var(--moh-muted); margin: 0 0 0.4rem; }

@media (max-width: 860px) {
  .post-grid { grid-template-columns: 1fr; }
}

/* CTA band */
.cta-band {
  background: linear-gradient(180deg, var(--moh-ink) 0%, var(--moh-ink-deep) 100%);
  color: var(--moh-white);
  text-align: center;
}
.cta-band h2 { color: var(--moh-white); }
.cta-band p { color: rgba(255,255,255,0.8); max-width: 560px; margin: 0 auto 1.75rem; }

/* ==========================================================================
   7. Content (posts & pages)
   ========================================================================== */
.content-area { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.entry { max-width: 760px; margin: 0 auto; }
.entry-header { margin-bottom: 1.5rem; }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content img { border-radius: var(--moh-radius); }
.entry-content blockquote {
  margin: 1.5em 0;
  padding: 0.5em 0 0.5em 1.25em;
  border-left: 3px solid var(--moh-gold-soft);
  font-family: var(--font-display);
  font-size: 1.2em;
  color: var(--moh-ink);
}
.entry-thumb { margin: 0 0 1.75rem; }
.entry-thumb img { border-radius: var(--moh-radius); width: 100%; }

.alignwide { max-width: 1000px; margin-left: auto; margin-right: auto; }
.alignfull { max-width: none; width: 100vw; margin-left: calc(50% - 50vw); }

/* Archive lists */
.archive-title { text-align: center; margin-bottom: 2.5rem; }
.archive-title span { color: var(--moh-gold-soft); }

/* Pagination */
.pagination { text-align: center; margin-top: 3rem; }
.pagination .page-numbers {
  display: inline-block;
  padding: 0.5rem 0.9rem;
  border-radius: var(--moh-radius);
  background: var(--moh-white);
  box-shadow: var(--moh-shadow);
  text-decoration: none;
  font-weight: 600;
}
.pagination .current { background: var(--moh-gold-soft); color: var(--moh-ink-deep); }

/* Comments */
.comments-area { max-width: 760px; margin: 3rem auto 0; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { background: var(--moh-white); border-radius: var(--moh-radius); padding: 1.25rem 1.5rem; margin-bottom: 1rem; box-shadow: var(--moh-shadow); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea,
.search-form .search-field {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid #d5d9e0;
  border-radius: var(--moh-radius);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--moh-white);
}

/* Search form */
.search-form { display: flex; gap: 0.6rem; max-width: 480px; }

/* 404 */
.error-404 { text-align: center; padding: 4rem 0; }

/* ==========================================================================
   8. Footer
   ========================================================================== */
.site-footer {
  background: var(--moh-ink);
  color: rgba(255,255,255,0.8);
}
.footer-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  padding: clamp(2.5rem, 6vw, 4rem) 0;
}
.site-footer h4 {
  color: var(--moh-white);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 1rem;
}
.footer-mission {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--moh-white);
  line-height: 1.4;
  margin: 0;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.site-footer a { color: rgba(255,255,255,0.8); text-decoration: none; }
.site-footer a:hover { color: var(--moh-gold-soft); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 1.25rem 0;
  font-size: 0.85rem;
  text-align: center;
  color: rgba(255,255,255,0.55);
}

@media (max-width: 860px) {
  .footer-cols { grid-template-columns: 1fr; gap: 1.75rem; }
}

/* ==========================================================================
   9. Gentle animations (applied by assets/js/reveal.js)
   ========================================================================== */
.moh-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: opacity, transform;
}
.moh-reveal.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes moh-hero-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.moh-hero-in { animation: moh-hero-in 0.9s ease-out both; }

/* Slightly smoother hover lifts */
.pillar,
.post-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.pillar:hover,
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(20, 32, 47, 0.14);
}

@media (prefers-reduced-motion: reduce) {
  .moh-reveal { opacity: 1; transform: none; transition: none; }
  .moh-hero-in { animation: none; }
}
