/* ==========================================================================
   Unseen Hand Ministries — Design System
   Warm Modern Nonprofit
   ========================================================================== */

:root {
  /* Tennessee Americana palette: denim navy, brick crimson, gold, cream */
  --color-forest: #1e3a5f;
  --color-forest-dark: #142a44;
  --color-terracotta: #8c2f39;
  --color-terracotta-dark: #6f232b;
  --color-amber: #c99a3d;
  --color-cream: #f7f2e7;
  --color-cream-dark: #efe4cd;
  --color-ink: #23291f;
  --color-ink-soft: #52584c;
  --color-white: #ffffff;
  --color-border: #e2d6b8;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;

  --shadow-soft: 0 10px 30px rgba(30, 58, 95, 0.12);
  --shadow-card: 0 6px 20px rgba(30, 58, 95, 0.09);

  --container: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-forest-dark);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 600;
}

h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; color: var(--color-ink-soft); }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--color-terracotta-dark);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--color-terracotta);
  display: inline-block;
}

.section {
  padding: 88px 0;
}
.section--tight { padding: 56px 0; }
.section--forest {
  background: var(--color-forest);
  color: var(--color-cream);
}
.section--forest h2, .section--forest h3 { color: var(--color-white); }
.section--forest p { color: rgba(247, 242, 231, 0.88); }
.section--cream-dark { background: var(--color-cream-dark); }

.section-head {
  max-width: 640px;
  margin: 0 0 48px;
}
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn--primary {
  background: var(--color-terracotta);
  color: var(--color-white);
}
.btn--primary:hover { background: var(--color-terracotta-dark); transform: translateY(-2px); }
.btn--outline {
  background: transparent;
  border-color: rgba(255,255,255,0.5);
  color: currentColor;
}
.btn--outline:hover { background: rgba(255,255,255,0.12); }
.btn--dark {
  background: var(--color-forest);
  color: var(--color-white);
}
.btn--dark:hover { background: var(--color-forest-dark); transform: translateY(-2px); }
.btn--sm { padding: 10px 22px; font-size: 0.85rem; }
.btn--block { width: 100%; justify-content: center; }

/* Top bar */
.topbar {
  background: var(--color-forest-dark);
  color: rgba(247,242,231,0.88);
  font-size: 0.82rem;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 9px;
  padding-bottom: 9px;
  flex-wrap: wrap;
  gap: 8px;
}
.topbar-info { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar-info span { display: inline-flex; align-items: center; gap: 6px; }
.topbar-social { display: flex; gap: 12px; }
.topbar-social a {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}
.topbar-social a:hover { background: var(--color-terracotta); }

/* Header / Nav */
.site-header {
  background: var(--color-white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--color-forest-dark);
}
.logo img { height: 46px; width: auto; }

.nav-links {
  display: flex;
  gap: 34px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-ink);
  position: relative;
  padding: 6px 0;
}
.nav-links a:hover, .nav-links a.active { color: var(--color-terracotta-dark); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 2px;
  background: var(--color-terracotta);
  border-radius: 2px;
}

.nav-right { display: flex; align-items: center; gap: 18px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--color-forest-dark);
}

@media (max-width: 900px) {
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--color-white);
    flex-direction: column;
    gap: 0;
    box-shadow: var(--shadow-soft);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav-links.open { max-height: 400px; }
  .nav-links li { border-top: 1px solid var(--color-border); }
  .nav-links a { display: block; padding: 14px 24px; }
  .nav-toggle { display: block; }
  .topbar-info span:first-child { display: none; }
}

/* Hero */
.hero {
  position: relative;
  background: linear-gradient(120deg, rgba(20,51,41,0.88), rgba(31,77,63,0.72)), var(--hero-img) center/cover no-repeat;
  color: var(--color-white);
  padding: 130px 0 110px;
}
.hero-inner { max-width: 640px; }
.hero .eyebrow { color: var(--color-amber); }
.hero .eyebrow::before { background: var(--color-amber); }
.hero h1 { color: var(--color-white); }
.hero p { color: rgba(247,242,231,0.9); font-size: 1.12rem; max-width: 520px; }
.hero-actions { display: flex; gap: 16px; margin-top: 30px; flex-wrap: wrap; }

/* Hero slider — fits within the viewport (minus topbar + header) */
.hero-slider {
  position: relative;
  overflow: hidden;
  background: var(--color-forest-dark);
  height: calc(100svh - 132px);
  min-height: 440px;
  max-height: 680px;
}
.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 28px 0;
  color: var(--color-white);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s ease;
}
.hero-slide.is-active { opacity: 1; visibility: visible; z-index: 1; }

/* Real image element as the slide background — reliable across browsers */
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
/* Directional scrim so the panel stays readable while the photo shows */
.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgba(15,32,26,0.62) 0%, rgba(15,32,26,0.22) 44%, rgba(15,32,26,0) 70%);
}
.hero-slide .container { position: relative; z-index: 2; width: 100%; }

/* Contained text panel — leaves the rest of the photo visible */
.hero-panel {
  max-width: 560px;
  background: rgba(20,51,41,0.82);
  border-left: 5px solid var(--color-amber);
  border-radius: 16px;
  padding: 30px 40px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.32);
  animation: heroFade 1s ease both;
}
.hero-panel .eyebrow { color: var(--color-amber); margin-bottom: 12px; }
.hero-panel .eyebrow::before { background: var(--color-amber); }
/* Reserve 2 lines for the heading so every slide's panel is the same height */
.hero-panel h1 {
  color: var(--color-white);
  margin-bottom: 14px;
  min-height: 2.3em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Reserve 2 lines for the paragraph and cut any overflow */
.hero-panel p {
  color: rgba(247,242,231,0.92);
  font-size: 1.06rem;
  margin-bottom: 0;
  min-height: calc(1.5em * 2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}
@keyframes heroFade { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(247,242,231,0.5);
  background: rgba(20,51,41,0.35);
  color: var(--color-white);
  font-size: 1.7rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.hero-arrow:hover { background: var(--color-amber); border-color: var(--color-amber); }
.hero-arrow--prev { left: 24px; }
.hero-arrow--next { right: 24px; }

.hero-dots {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 12px;
}
.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--color-white);
  background: transparent;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}
.hero-dots button.is-active { background: var(--color-amber); border-color: var(--color-amber); transform: scale(1.15); }

@media (max-width: 700px) {
  .hero-slider { height: calc(100svh - 112px); min-height: 420px; }
  .hero-slide { padding: 24px 0; }
  .hero-panel { padding: 24px 24px; border-radius: 14px; }
  .hero-arrow { width: 40px; height: 40px; font-size: 1.4rem; }
  .hero-arrow--prev { left: 10px; }
  .hero-arrow--next { right: 10px; }
}

.page-hero {
  padding: 76px 0 64px;
}
.page-hero .eyebrow { color: var(--color-amber); }
.page-hero .eyebrow::before { background: var(--color-amber); }
.page-hero h1 { color: var(--color-white); margin-bottom: 10px; }
.breadcrumb { color: rgba(247,242,231,0.78); font-size: 0.9rem; }
.breadcrumb a:hover { color: var(--color-white); }

/* Grids */
.grid {
  display: grid;
  gap: 32px;
}
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid--3, .grid--4, .grid--2 { grid-template-columns: 1fr; }
}

/* Cards */
.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); }
.card-img { aspect-ratio: 4/3; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 26px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin-bottom: 10px; }
.card-body p { flex: 1; font-size: 0.94rem; }

/* Progress bar */
.progress-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--color-ink-soft);
  margin-bottom: 6px;
}
.progress-stats strong { color: var(--color-forest-dark); }
.progress-track {
  height: 8px;
  border-radius: 20px;
  background: var(--color-cream-dark);
  overflow: hidden;
  margin-bottom: 14px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-terracotta), var(--color-amber));
  border-radius: 20px;
}

/* Feature / icon blocks */
.feature {
  text-align: center;
  padding: 10px;
}
.feature-icon {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: var(--color-cream-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.6rem;
  color: var(--color-terracotta-dark);
}

/* Split section (image + text) */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split img { border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); }
.split.reverse .split-media { order: 2; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split.reverse .split-media { order: 0; }
}

/* Stats strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stats-strip .num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--color-amber);
  font-weight: 700;
}
@media (max-width: 700px) { .stats-strip { grid-template-columns: repeat(2, 1fr); } }

/* CTA banner */
.cta-banner {
  background: var(--color-terracotta);
  border-radius: var(--radius-lg);
  padding: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  color: var(--color-white);
}
.cta-banner h2 { color: var(--color-white); margin-bottom: 8px; }
.cta-banner p { color: rgba(255,255,255,0.9); margin: 0; }

/* Person / child card */
.person-card { text-align: center; }
.person-card .card-img { aspect-ratio: 1/1; }
.person-card .card-img img { object-position: center top; }
.person-card .card-body { padding: 22px; }
.person-card .meta { font-size: 0.86rem; color: var(--color-ink-soft); margin-bottom: 16px; }

/* Detail page (campaign / child) */
.detail-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 900px) { .detail-layout { grid-template-columns: 1fr; } }
.detail-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-card); width: 100%; aspect-ratio: 4/3; object-fit: cover; object-position: center top; }

/* Compact child detail page — keeps photo, story and CTA within view */
.child-detail .page-hero { padding: 30px 0 26px; }
.child-detail .page-hero .eyebrow { margin-bottom: 8px; }
.child-detail .page-hero h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 4px; }
.child-detail-main { padding: 44px 0 60px; }
.child-detail-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 44px;
  align-items: start;
}
.child-photo .detail-media img { aspect-ratio: 1/1; }
.child-back { margin-top: 16px; width: 100%; justify-content: center; border-color: var(--color-border); color: var(--color-forest-dark); }
.child-info .tag { margin-bottom: 14px; }
.child-info h2 { margin: 0 0 10px; }
.child-info .child-note { font-weight: 600; color: var(--color-forest-dark); margin-bottom: 10px; }
.child-info p { font-size: 0.96rem; }
.sponsor-box {
  margin-top: 22px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 22px 24px;
}
.sponsor-box h3 { margin: 0 0 6px; }
.sponsor-box .sponsor-lead { font-size: 0.9rem; margin-bottom: 16px; }
.sponsor-box .fineprint { font-size: 0.8rem; color: var(--color-ink-soft); margin: 12px 0 0; }
@media (max-width: 760px) {
  .child-detail-grid { grid-template-columns: 1fr; gap: 26px; }
  .child-photo .detail-media img { aspect-ratio: 4/3; }
}
.detail-sidebar {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-card);
  position: sticky;
  top: 100px;
}
.tag {
  display: inline-block;
  background: var(--color-cream-dark);
  color: var(--color-forest-dark);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 14px;
}

/* Scripture / quote block */
.quote-block {
  border-left: 4px solid var(--color-terracotta);
  padding: 4px 0 4px 28px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--color-forest-dark);
  margin: 36px 0;
}
.quote-block cite { display: block; font-style: normal; font-size: 0.85rem; color: var(--color-ink-soft); margin-top: 10px; font-family: var(--font-body); font-weight: 600; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-bottom: 48px; }
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-item { background: var(--color-white); border-radius: var(--radius-md); padding: 28px; box-shadow: var(--shadow-card); }
.contact-item .feature-icon { margin: 0 0 16px; }
.map-frame { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); }
.map-frame iframe { width: 100%; height: 380px; border: 0; display: block; }

/* Form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.field.full { grid-column: 1 / -1; }
label { font-size: 0.85rem; font-weight: 600; color: var(--color-forest-dark); }
input, textarea, select {
  font-family: var(--font-body);
  padding: 13px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  background: var(--color-white);
  color: var(--color-ink);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--color-terracotta); }
textarea { resize: vertical; min-height: 120px; }

/* Footer */
.site-footer {
  background: var(--color-forest-dark);
  color: rgba(247,242,231,0.92);
  padding: 72px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
.footer-grid h4 { color: var(--color-white); font-family: var(--font-body); font-size: 1rem; margin-bottom: 20px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-grid a:hover { color: var(--color-amber); }
.footer-about img { height: 40px; margin-bottom: 16px; }
.footer-about p { font-size: 0.9rem; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: inline-flex; align-items: center; justify-content: center;
}
.footer-social a:hover { background: var(--color-terracotta); }
.footer-sub { display: flex; gap: 10px; margin-top: 6px; }
.footer-sub input { flex: 1; }
.footer-bottom {
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom a:hover { color: var(--color-amber); }

/* Pagination-style link row (donate/sponsor list pages) */
.list-note {
  background: var(--color-white);
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  font-size: 0.9rem;
  margin-bottom: 40px;
}

/* utilities */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.center-btn { display: flex; justify-content: center; margin-top: 20px; }
