/* ============================================================
   Holly Springs church of Christ — site stylesheet
   Edit colors here once; every page picks them up.
   ============================================================ */

:root {
  --leaf:       #AFCD73;   /* light green  */
  --moss:       #9CB464;   /* dark green   */
  --creek:      #499FB8;   /* blue accent  */
  --creek-deep: #2F7A93;   /* darker blue for readable links */
  --moss-deep:  #55642F;   /* deep green for headings on light bg */
  --ink:        #29321F;   /* near-black text */
  --paper:      #FBFCF7;   /* warm off-white background */
  --card:       #FFFFFF;
  --line:       #E3E9D4;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Nunito Sans", "Segoe UI", Arial, sans-serif;

  --maxw: 1080px;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(41, 50, 31, 0.08);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 1.05rem;
}

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

a { color: var(--creek-deep); }
a:hover { color: var(--creek); }

:focus-visible {
  outline: 3px solid var(--creek);
  outline-offset: 2px;
  border-radius: 4px;
}

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

/* ---------- Header / navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 252, 247, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
}

.brand svg { flex: 0 0 auto; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  line-height: 1.2;
}

.brand-name span { color: var(--moss-deep); display: block; font-size: 0.8rem; font-weight: 400; letter-spacing: 0.04em; }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--moss);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 0.5rem 0.85rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.98rem;
  border-radius: 999px;
  transition: background 0.15s ease;
}

.nav-links a:hover { background: var(--line); color: var(--ink); }

.nav-links a[aria-current="page"] {
  background: var(--leaf);
  color: var(--ink);
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2.5rem;
  align-items: center;
  padding: 4rem 0 3.5rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--creek-deep);
  margin-bottom: 0.9rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.1rem, 4.5vw, 3.2rem);
  line-height: 1.12;
  color: var(--ink);
  margin-bottom: 1.1rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--moss-deep);
}

.hero p.lede {
  font-size: 1.15rem;
  max-width: 32rem;
  margin-bottom: 1.6rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--creek);
  color: #fff;
  box-shadow: 0 4px 14px rgba(73, 159, 184, 0.35);
}
.btn-primary:hover { background: var(--creek-deep); color: #fff; }

.btn-ghost {
  border: 2px solid var(--moss);
  color: var(--moss-deep);
}

/* Button rows: 'gap' spaces buttons both horizontally (side by side)
   and vertically (when they wrap on narrow screens) */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.btn-row.centered { justify-content: center; }
.btn-ghost:hover { background: var(--leaf); color: var(--ink); }

/* Service-times card — the signature element */

.times-card {
  background: linear-gradient(160deg, var(--moss) 0%, #8AA354 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.8rem 1.8rem 1.5rem;
  box-shadow: var(--shadow);
}

.times-card h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.times-card dl { display: grid; gap: 0.85rem; }

.times-card .slot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  padding-bottom: 0.6rem;
}

.times-card dt { font-weight: 700; }
.times-card dt small { display: block; font-weight: 400; opacity: 0.9; }
.times-card dd { font-family: var(--font-display); font-size: 1.15rem; white-space: nowrap; }

.times-card a { color: #fff; text-decoration-color: rgba(255,255,255,0.6); }
.times-card a:hover { color: #fff; text-decoration-color: #fff; }

.times-card .where {
  margin-top: 1rem;
  font-size: 0.92rem;
  line-height: 1.5;
  opacity: 0.95;
}

/* ---------- Sprig divider ---------- */

.sprig {
  display: flex;
  justify-content: center;
  padding: 0.5rem 0 1rem;
}

/* ---------- Sections ---------- */

.section { padding: 3rem 0; }

.section.tint { background: #F2F6E7; }
.section.tint-blue { background: #EAF4F7; }

.section h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--ink);
  margin-bottom: 0.6rem;
}

.section .section-intro {
  max-width: 40rem;
  margin-bottom: 2rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--moss-deep);
}

.card .card-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--leaf);
  display: grid;
  place-items: center;
  margin-bottom: 0.9rem;
}

/* ---------- Sermon & article lists ---------- */

.entry-list { display: grid; gap: 1rem; list-style: none; }

.entry {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 5px solid var(--moss);
  border-radius: 10px;
  padding: 1.1rem 1.4rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem 1rem;
  align-items: center;
}

.entry.article-entry { border-left-color: var(--creek); }

.entry h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.entry .meta { font-size: 0.9rem; color: #5B6650; grid-column: 1 / -1; }
.entry .meta strong { color: var(--moss-deep); }
.entry .tag {
  justify-self: end;
  background: var(--leaf);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
}
.entry .tag.blue { background: #CBE5EE; }

.entry .listen { font-weight: 700; font-size: 0.92rem; }

.article-body {
  grid-column: 1 / -1;
  margin-top: 0.6rem;
  display: none;
}
.entry.open .article-body { display: block; }

.read-more {
  background: none;
  border: none;
  color: var(--creek-deep);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  justify-self: start;
}
.read-more:hover { text-decoration: underline; }

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.filter-row input, .filter-row select {
  font: inherit;
  padding: 0.55rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  min-width: 200px;
}

/* ---------- Forms ---------- */

.form-grid { display: grid; gap: 1rem; max-width: 34rem; }

.form-grid label { font-weight: 700; font-size: 0.95rem; }

.form-grid input, .form-grid textarea {
  font: inherit;
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  margin-top: 0.3rem;
}

.form-grid input:focus, .form-grid textarea:focus {
  border-color: var(--creek);
  outline: none;
  box-shadow: 0 0 0 3px rgba(73, 159, 184, 0.2);
}

.form-note { font-size: 0.88rem; color: #5B6650; }

/* ---------- Contact layout ---------- */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }

.contact-lines { display: grid; gap: 1rem; margin-top: 1rem; }
.contact-lines .line-item { display: flex; gap: 0.8rem; align-items: flex-start; }
.contact-lines .line-item svg { flex: 0 0 auto; margin-top: 0.2rem; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink);
  color: #E9EEDD;
  margin-top: 3rem;
  padding: 2.5rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(233, 238, 221, 0.2);
}

.site-footer h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--leaf); margin-bottom: 0.6rem; }
.site-footer a { color: #E9EEDD; }
.site-footer a:hover { color: var(--leaf); }
.site-footer ul { list-style: none; display: grid; gap: 0.35rem; }
.footer-bottom { padding-top: 1.2rem; font-size: 0.85rem; opacity: 0.8; text-align: center; }

/* ---------- Utility ---------- */

.center { text-align: center; }
.muted { color: #5B6650; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

/* ---------- Responsive ---------- */

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 2.5rem; }
  .split { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }

  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: 0.5rem 1rem 1rem;
  }
  .nav-links.open { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ---------- Warmth & new sections (v2) ---------- */

/* Soft sunrise wash behind the home hero */
main.home {
  background:
    radial-gradient(60rem 28rem at 85% -5%, rgba(175, 205, 115, 0.28), transparent 60%),
    radial-gradient(50rem 24rem at 0% 10%, rgba(73, 159, 184, 0.12), transparent 55%);
}

/* Sermon embed */
.sermon-split {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.6rem;
  align-items: start;
}

.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--ink);
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.sermon-side .btn { width: 100%; text-align: center; }

/* Photo gallery — snapshot style */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}

.gallery figure {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.7rem 0.9rem;
  box-shadow: var(--shadow);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.18s ease;
}

.gallery figure:nth-child(odd)  { --tilt: -1.2deg; }
.gallery figure:nth-child(even) { --tilt: 1.1deg; }
.gallery figure:hover { transform: rotate(0deg) scale(1.02); }

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
}

.gallery figcaption {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--moss-deep);
  text-align: center;
  padding-top: 0.6rem;
}

/* Map embed */
.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.map-embed iframe {
  display: block;
  width: 100%;
  height: 300px;
  border: 0;
}

@media (max-width: 820px) {
  .sermon-split { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery figure { transform: none; }
}

/* Calendar embed (Events page) */
.calendar-embed {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
}

/* Scripture quotations inside articles (auto-detected) */
.scripture {
  border-left: 4px solid var(--leaf);
  background: #F5F8EC;
  border-radius: 0 8px 8px 0;
  padding: 0.7rem 1.1rem;
  margin: 0.9rem 0;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--moss-deep);
}

/* ============================================================
   Interactive layer (v5)
   ============================================================ */

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

/* --- Hero entrance (staggered) --- */
@keyframes rise-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero .eyebrow, .hero h1, .hero .lede, .hero .btn-row { animation: rise-in 0.7s ease backwards; }
.hero h1 { animation-delay: 0.1s; }
.hero .lede { animation-delay: 0.22s; }
.hero .btn-row { animation-delay: 0.34s; }
.times-card { animation: rise-in 0.8s 0.3s ease backwards; }

/* --- Floating leaves behind hero --- */
.leaf-float { position: absolute; opacity: 0.5; pointer-events: none; z-index: -1; }
.leaf-a { top: 8%; right: 6%; animation: drift 11s ease-in-out infinite; }
.leaf-b { bottom: 4%; left: 3%; animation: drift 14s 2s ease-in-out infinite reverse; }
@keyframes drift {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(6deg); }
}
.hero { position: relative; }

/* --- Live next-service line --- */
.next-up {
  display: none;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  padding: 0.55rem 0.9rem;
  margin-bottom: 1rem;
  font-weight: 700;
  font-size: 0.95rem;
}
.next-up.show { display: block; animation: rise-in 0.5s ease backwards; }
.next-up .live-dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  background: #FFF3B0; margin-right: 0.45rem;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* --- Micro-interactions --- */
.card, .entry, .times-card { transition: transform 0.18s ease, box-shadow 0.18s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(41, 50, 31, 0.13); }
.btn { transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease; }
.btn:hover { transform: translateY(-2px); }
.site-header { transition: box-shadow 0.25s ease; }
.site-header.scrolled { box-shadow: 0 6px 18px rgba(41, 50, 31, 0.1); }

/* --- New Here? accordion --- */
.faq { display: grid; gap: 0.8rem; max-width: 46rem; }
.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.3rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--moss-deep);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.5rem;
  line-height: 1;
  color: var(--creek-deep);
  transition: transform 0.25s ease;
  flex: 0 0 auto;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 1.3rem 1.1rem; }
.faq details[open] > div { animation: rise-in 0.35s ease backwards; }

/* --- Verse of encouragement --- */
.verse-card {
  max-width: 42rem;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 2rem 1.6rem;
  text-align: center;
}
.verse-card blockquote {
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--ink);
  transition: opacity 0.35s ease;
}
.verse-card blockquote.fading { opacity: 0; }
.verse-card cite { display: block; margin-top: 0.8rem; font-style: normal; font-weight: 700; color: var(--creek-deep); font-size: 0.95rem; }
.verse-next {
  margin-top: 1.2rem;
  background: none;
  border: 2px solid var(--leaf);
  border-radius: 999px;
  padding: 0.5rem 1.2rem;
  font: inherit;
  font-weight: 700;
  color: var(--moss-deep);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
}
.verse-next:hover { background: var(--leaf); transform: translateY(-2px); }

/* --- Gallery lightbox --- */
.gallery figure { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(41, 50, 31, 0.92);
  display: none;
  align-items: center; justify-content: center;
  padding: 2rem;
}
.lightbox.open { display: flex; animation: fade-in 0.25s ease; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.lightbox img {
  max-width: min(92vw, 900px);
  max-height: 78vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  background: #fff;
}
.lightbox figcaption {
  color: #E9EEDD; text-align: center; margin-top: 1rem;
  font-family: var(--font-display); font-size: 1.1rem;
}
.lightbox .lb-btn {
  position: absolute; background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.3); color: #fff;
  border-radius: 50%; width: 46px; height: 46px;
  font-size: 1.4rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.15s ease;
}
.lightbox .lb-btn:hover { background: rgba(255,255,255,0.28); }
.lb-close { top: 1.2rem; right: 1.2rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }

/* --- Back to top --- */
.to-top {
  position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 60;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--moss); color: #fff; border: none;
  font-size: 1.3rem; cursor: pointer;
  box-shadow: 0 6px 18px rgba(41, 50, 31, 0.3);
  opacity: 0; pointer-events: none; transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.15s ease;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--moss-deep); }

/* --- Reduced motion: calm everything --- */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero .eyebrow, .hero h1, .hero .lede, .hero .btn-row, .times-card,
  .next-up.show, .faq details[open] > div { animation: none; }
  .leaf-float { animation: none; }
  .next-up .live-dot { animation: none; }
  .card:hover, .btn:hover, .verse-next:hover { transform: none; }
}

/* Embedded Drive document viewer (Word/PDF articles) */
.drive-embed {
  width: 100%;
  height: 520px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

/* Scripture copyright notice (footer) */
.scripture-notice {
  font-size: 0.72rem;
  line-height: 1.5;
  opacity: 0.65;
  padding-top: 1.2rem;
  text-align: center;
  max-width: 52rem;
  margin: 0 auto;
}
