/* ===========================================================
   RBPC — Raphoe & Balindrait Presbyterian Church
   Design tokens
   =========================================================== */
:root {
  --green-deep:   #1F3D2B;   /* hedgerow — primary dark */
  --green-mid:    #35573F;   /* lighter field green */
  --gorse:        #E8A93B;   /* bold accent — gorse yellow */
  --gorse-deep:   #C98B22;   /* hover/darker gorse */
  --teal:         #4A7C82;   /* atlantic teal — links, secondary */
  --stone:        #EEF0EA;   /* pale stone background */
  --stone-dim:    #E2E5DC;   /* card background */
  --ink:          #21261D;   /* near-black warm ink */
  --ink-soft:     #4B5245;   /* secondary text */
  --white:        #FFFDF8;

  --font-display: "Fraunces", Georgia, serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, monospace;

  --radius: 6px;
  --max-width: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

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

h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.3rem; }

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

a { color: var(--teal); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--gorse);
  outline-offset: 2px;
}

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

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--gorse-deep);
  display: block;
  margin-bottom: 0.75em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85em 1.6em;
  border-radius: var(--radius);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gorse); color: var(--green-deep); }
.btn-primary:hover { background: var(--gorse-deep); }
.btn-outline { background: transparent; border-color: var(--white); color: var(--white); }
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-outline-dark { background: transparent; border-color: var(--green-deep); color: var(--green-deep); }
.btn-outline-dark:hover { background: var(--green-deep); color: var(--white); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--stone-dim);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 16px; padding-bottom: 16px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--green-deep);
  text-decoration: none;
  letter-spacing: 0.01em;
  max-width: 320px;
  line-height: 1.15;
}
.logo span { color: var(--gorse-deep); }

@media (max-width: 900px) {
  .logo { font-size: 0.95rem; max-width: 220px; }
}
nav.main-nav ul {
  list-style: none; display: flex; gap: 28px; margin: 0; padding: 0;
}
nav.main-nav a {
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.95rem;
  padding-bottom: 4px; border-bottom: 2px solid transparent;
}
nav.main-nav a:hover, nav.main-nav a[aria-current="page"] {
  border-bottom-color: var(--gorse);
}
.nav-toggle { display: none; }

@media (max-width: 760px) {
  nav.main-nav ul { position: fixed; inset: 64px 0 auto 0; background: var(--white);
    flex-direction: column; padding: 20px 24px; gap: 16px; display: none;
    border-bottom: 1px solid var(--stone-dim); }
  nav.main-nav ul.open { display: flex; }
  .nav-toggle {
    display: block; background: none; border: none; font-size: 1.6rem; cursor: pointer;
    color: var(--green-deep);
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(180deg, #DCE9E3 0%, #EDF3ED 55%, var(--stone) 100%);
  overflow: hidden;
  padding: 90px 0 0;
}
.hero .wrap { position: relative; z-index: 2; text-align: center; }
.hero .eyebrow { text-align: center; }
.hero p.lede {
  font-size: 1.2rem; max-width: 560px; margin: 0 auto 2em;
  color: var(--ink-soft);
}
.hero .btn-row { justify-content: center; margin-bottom: 70px; }

/* Horizon signature motif */
.horizon {
  position: relative;
  width: 100%;
  height: 120px;
  display: block;
  margin-top: -2px;
}
.horizon svg { display: block; width: 100%; height: 100%; }
.horizon.flip { transform: scaleY(-1); }

/* ---------- Section scaffolding ---------- */
section { padding: 72px 0; }
section.tight { padding: 48px 0; }
.section-head { max-width: 640px; margin-bottom: 2.5em; }
.section-dark {
  background: var(--green-deep);
  color: var(--white);
}
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark p { color: #CFE0D3; }
.section-dark .eyebrow { color: var(--gorse); }

/* ---------- Welcome / two-col ---------- */
.two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

.photo-placeholder {
  border: 2px dashed #A9B79E;
  border-radius: var(--radius);
  background: repeating-linear-gradient(135deg, #E5E9DE, #E5E9DE 10px, #DEE3D5 10px, #DEE3D5 20px);
  color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center;
  text-align: center; font-family: var(--font-mono); font-size: 0.8rem;
  padding: 20px; min-height: 220px;
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px;
}
.card {
  background: var(--white);
  border: 1px solid var(--stone-dim);
  border-radius: var(--radius);
  padding: 24px;
  scroll-margin-top: 90px;
}
a.card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
a.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(31, 61, 43, 0.12);
  border-color: var(--gorse);
}
.date-badge {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--white);
  background: var(--green-mid);
  display: inline-block;
  padding: 4px 10px;
  border-radius: 3px;
  margin-bottom: 12px;
}

/* ---------- Mission spotlight ---------- */
.spotlight {
  background: var(--stone-dim);
  border-left: 4px solid var(--gorse);
  border-radius: var(--radius);
  padding: 40px;
}
@media (max-width: 760px) { .spotlight { padding: 24px; } }

/* ---------- Stat strip ---------- */
.stat-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px; text-align: center;
}
.stat-strip .stat-num {
  font-family: var(--font-display); font-size: 2.4rem; color: var(--gorse);
  font-weight: 700; display: block;
}
.stat-strip .stat-label {
  font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: #CFE0D3;
}

/* ---------- Service times ---------- */
.location-card {
  background: var(--white); border: 1px solid var(--stone-dim); border-radius: var(--radius);
  padding: 28px;
}
.location-card .eyebrow { color: var(--teal); }

/* ---------- Forms ---------- */
form.church-form {
  display: grid; gap: 18px; max-width: 620px;
}
form.church-form label {
  font-weight: 600; font-size: 0.9rem; display: block; margin-bottom: 6px; color: var(--ink);
}
form.church-form input,
form.church-form select,
form.church-form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid #C7CDBB; border-radius: var(--radius);
  font-family: var(--font-body); font-size: 1rem; background: var(--white); color: var(--ink);
}
form.church-form textarea { min-height: 110px; resize: vertical; }
.field-hint { font-size: 0.82rem; color: var(--ink-soft); margin-top: 4px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; }
.checkbox-row input { width: auto; margin-top: 4px; }
.checkbox-row label { font-weight: 400; margin: 0; }
.honeypot { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--ink);
  color: #CBD1C4;
  padding: 56px 0 32px;
}
footer.site-footer h4 { color: var(--white); font-family: var(--font-body); font-size: 1rem; }
footer.site-footer a { color: #CBD1C4; text-decoration: none; }
footer.site-footer a:hover { color: var(--gorse); }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; margin-bottom: 32px;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-bottom {
  border-top: 1px solid #3A3F32; padding-top: 20px; font-size: 0.85rem; color: #8B9280;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }

/* ---------- Utility ---------- */
.badge-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 1em 0; }
.badge-list li {
  list-style: none; background: var(--stone-dim); font-family: var(--font-mono);
  font-size: 0.75rem; padding: 5px 10px; border-radius: 3px; color: var(--green-deep);
}
.pill-note {
  display: inline-block; background: #FDF3DF; border: 1px solid var(--gorse);
  color: var(--green-deep); font-size: 0.85rem; padding: 10px 16px; border-radius: var(--radius);
  margin-top: 10px;
}
