/* ============================================================
   SAGE FARMS — stylesheet
   Palette: sage green, warm cream, saddle brown, deep charcoal.
   Designed for accessibility: strong contrast, large tap
   targets, visible focus, respects reduced-motion.
   ============================================================ */

:root {
  /* Palette drawn from the salvia hero: lilac blooms, golden sunset, green foliage */
  --lilac:       #8168ab;   /* primary lilac (buttons, links, accents) */
  --lilac-deep:  #574385;   /* deep purple (brand, quote band, headings) */
  --lilac-soft:  #c3b1de;   /* soft lilac tint */
  --plum:        #6e4a7a;   /* warm plum (quote band under hero) */
  --plum-deep:   #3c2647;   /* dark warm plum (footer) */
  --gold:        #d3a94a;   /* warm gold (CTA buttons, quote band) */
  --gold-deep:   #9a7522;   /* darker gold for text on light (accessible) */
  --green:       #61764a;   /* foliage green */
  --green-deep:  #3f4f2f;   /* deep green (section headings, footer) */
  --cream:       #f3f1f6;   /* pale lilac-grey (main light background) */
  --cream-2:     #eae6f0;   /* deeper lilac-grey (alt section background) */
  --ink:         #2b2a25;   /* body text */
  --ink-soft:    #55514a;   /* secondary text */
  --white:       #ffffff;
  --shadow:      0 8px 30px rgba(63, 49, 92, 0.14);
  --radius:      14px;
  --wrap:        1120px;
  --font-head:   "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:   "Nunito Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  /* --- Back-compat aliases so existing rules keep working --- */
  --sage:      var(--lilac);
  --sage-dark: var(--lilac-deep);
  --sage-deep: var(--green-deep);
  --saddle:    var(--gold-deep);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

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

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

a { color: var(--sage-dark); }
a:hover { color: var(--saddle); }

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

/* ---- Accessibility helpers ---- */
.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--sage-deep); color: #fff; padding: 12px 18px;
  border-radius: 0 0 8px 0; z-index: 1000;
}
.skip-link:focus { left: 0; }

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

/* ============ HEADER ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(243, 241, 246, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(107, 133, 96, 0.2);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-logo { height: 53px; width: auto; display: block; }
.brand-fallback { align-items: center; gap: 10px; }
@media (max-width: 860px) { .brand-logo { height: 45px; } }
.brand-mark { color: var(--sage); font-size: 1.6rem; line-height: 1; }
.brand-name {
  font-family: var(--font-head); font-weight: 600; font-size: 1.4rem;
  color: var(--sage-deep); letter-spacing: 0.5px;
}

.nav-menu {
  list-style: none; display: flex; gap: 6px; margin: 0; padding: 0;
  align-items: center;
}
.nav-menu a {
  text-decoration: none; color: var(--ink); font-weight: 600;
  padding: 10px 14px; border-radius: 8px; font-size: 1rem; display: inline-block;
}
.nav-menu a:hover { background: rgba(107, 133, 96, 0.12); color: var(--sage-deep); }
.nav-cta {
  background: var(--sage); color: #fff !important;
}
.nav-cta:hover { background: var(--sage-dark); }

.nav-toggle {
  display: none;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem;
  background: var(--sage); color: #fff; border: 0;
  padding: 10px 16px; border-radius: 8px; cursor: pointer;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-block; text-decoration: none; font-weight: 700;
  padding: 14px 26px; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; font-size: 1.02rem; transition: transform .08s ease, background .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--gold); color: var(--ink); }
.btn-primary:hover { background: #c1962f; color: var(--ink); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.85); }
.btn-ghost:hover { background: rgba(255,255,255,0.16); color: #fff; }

/* ============ HERO ============ */
.hero { position: relative; color: #fff; overflow: hidden; }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(87,67,133,.32) 0%, rgba(43,42,37,.74) 100%);
}
.hero-content {
  position: relative; z-index: 1;
  padding: 132px 24px 120px;
  max-width: 820px;
}
.eyebrow {
  text-transform: uppercase; letter-spacing: 2px; font-weight: 700;
  font-size: 0.82rem; margin: 0 0 14px; color: #e8dcc4;
}
.hero h1 {
  font-family: var(--font-head); font-weight: 600;
  font-size: clamp(2.1rem, 5vw, 3.5rem); line-height: 1.08;
  margin: 0 0 20px; text-wrap: balance;
}
.lede { font-size: clamp(1.1rem, 2vw, 1.3rem); max-width: 620px; margin: 0 0 30px; color: #f3ecdd; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ============ QUOTE BANDS ============ */
.quote-band {
  position: relative; overflow: hidden;
  background: var(--plum); color: #fff; text-align: center; padding: 56px 0;
}
.quote-band::before {  /* horseshoe pattern under the hero */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url(../../images/horseshoe-pattern.svg);
  background-size: 300px auto; background-repeat: repeat;
  opacity: 0.10;
}
.quote-band .wrap { position: relative; z-index: 1; }
.quote-band--soft { background: var(--gold); color: var(--green-deep); }
.quote-band--soft::before {
  background-image: url(../../images/horseshoe-dark.svg);
  background-size: 300px auto; background-repeat: repeat;
  opacity: 0.12;
}
.quote-band--soft cite { opacity: 0.95; }
.quote-band blockquote { margin: 0; max-width: 820px; margin-inline: auto; }
.quote-band p {
  font-family: var(--font-head); font-style: italic;
  font-size: clamp(1.5rem, 3.5vw, 2.3rem); line-height: 1.25; margin: 0 0 12px;
  text-wrap: balance;
}
.quote-band cite {
  font-style: normal; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; font-size: 0.85rem; opacity: 0.9;
}

/* ============ SECTIONS ============ */
.section { padding: 84px 0; }
.section-alt { background: var(--cream-2); }

/* Mission section: horse photo clearly visible, text on a soft panel */
#mission { position: relative; overflow: hidden; background: var(--cream); }
#mission::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url(../../images/mission-bg.jpg) center/cover no-repeat;
  opacity: 0.85;
}
#mission .wrap {
  position: relative; z-index: 1;
  background: rgba(243, 241, 246, 0.88);
  padding: 40px 44px; border-radius: 18px;
  box-shadow: 0 10px 40px rgba(60, 38, 71, 0.16);
  backdrop-filter: blur(2px);
}
.mission-cols {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 30px; margin-top: 18px;
}
.mission-cols p { color: var(--ink); margin: 0; }  /* darker for readability over the photo */
@media (max-width: 860px) {
  #mission::before { display: none; }   /* remove horse background on mobile */
  #mission .wrap {   /* remove the bounding panel on mobile */
    background: none; padding: 0 24px; border-radius: 0;
    box-shadow: none; backdrop-filter: none;
  }
}
.section-green { background: #a9c597; }
.section-green .section-eyebrow { color: #6f5316; }   /* darker gold for contrast on green */
.section-eyebrow {
  text-transform: uppercase; letter-spacing: 2px; font-weight: 700;
  font-size: 0.8rem; color: var(--saddle); margin: 0 0 10px;
}
.section h2 {
  font-family: var(--font-head); font-weight: 600;
  font-size: clamp(1.7rem, 3.5vw, 2.5rem); line-height: 1.15;
  color: var(--sage-deep); margin: 0 0 22px; text-wrap: balance;
}
.section p { color: var(--ink-soft); margin: 0 0 18px; }
.section p strong { color: var(--ink); }

/* ============ PROGRAM CARDS ============ */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 12px; }
.card {
  background: var(--white); border-radius: var(--radius); padding: 32px 28px;
  box-shadow: var(--shadow); border: 1px solid rgba(107,133,96,0.12);
}
.card-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(129,104,171,0.15); color: var(--lilac-deep);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: 18px;
}
.card-icon img { height: 30px; width: auto; display: block; }
.card h3 { font-family: var(--font-head); font-weight: 600; color: var(--sage-deep); font-size: 1.35rem; margin: 0 0 10px; }
.card p { margin: 0; }

/* ============ TIMELINE ============ */
.timeline { list-style: none; margin: 28px 0 0; padding: 0; }
.timeline li {
  position: relative; padding: 0 0 26px 40px; border-left: 3px solid rgba(107,133,96,0.3);
  margin-left: 8px;
}
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -11px; top: 2px;
  width: 19px; height: 19px; border-radius: 50%;
  background: var(--cream); border: 3px solid var(--sage);
}
.timeline li.done::before { background: var(--sage); }
.timeline li.current::before { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 0 5px rgba(211,169,74,0.28); }
.timeline-label { display: block; font-weight: 700; color: var(--sage-deep); margin-bottom: 2px; font-size: 1.05rem; }
.timeline li.current .timeline-label { color: var(--saddle); }
.timeline p { margin: 0; font-size: 0.98rem; }

/* ============ TEAM ============ */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 12px; }
.bio {
  background: var(--white); border-radius: var(--radius); padding: 26px;
  box-shadow: var(--shadow); border: 1px solid rgba(107,133,96,0.12); text-align: center;
}
.bio-photo {
  width: 150px; height: 150px; border-radius: 50%; object-fit: cover;
  margin: 0 auto 18px; border: 4px solid var(--cream-2);
}
.bio h3 { font-family: var(--font-head); font-weight: 600; color: var(--sage-deep); font-size: 1.3rem; margin: 0 0 4px; }
.bio-role { color: var(--saddle); font-weight: 700; margin: 0 0 12px; font-size: 0.92rem; text-transform: uppercase; letter-spacing: 1px; }
.bio p:not(.bio-role) { color: var(--ink-soft); font-size: 0.98rem; margin: 0 0 14px; text-align: left; }
.bio p:last-child { margin-bottom: 0; }

/* ============ HOW TO HELP ============ */
.section-help { background: var(--cream); }
.pledge-form {
  background: var(--white); border-radius: var(--radius); padding: 32px;
  box-shadow: var(--shadow); margin-top: 28px; border: 1px solid rgba(107,133,96,0.12);
}
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.optional { font-weight: 400; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; font-size: 1rem; font-family: var(--font-body);
  border: 2px solid rgba(107,133,96,0.35); border-radius: 10px; background: var(--cream);
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--sage); background: #fff; outline: none;
}
.field textarea { resize: vertical; }
.hp { position: absolute; left: -5000px; }  /* honeypot off-screen */
.form-note { margin: 16px 0 0; font-size: 0.95rem; color: var(--ink-soft); }

.alert { padding: 16px 20px; border-radius: 10px; margin: 22px 0 0; font-weight: 600; }
.alert-ok { background: #e3efdd; color: #33502a; border: 1px solid #a9cf9a; }
.alert-error { background: #f7e3df; color: #8a3a2c; border: 1px solid #e0a99f; }

/* ============ FOOTER ============ */
.site-footer {
  position: relative; overflow: hidden;
  background: var(--plum-deep); color: #ece6f0; padding: 56px 0 30px;
}
.site-footer::before {  /* subtle leaf pattern */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url(../../images/pattern-light.svg);
  background-size: 760px auto; background-repeat: repeat;
  opacity: 0.07;
}
.site-footer .wrap { position: relative; z-index: 1; }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-logo { height: 52px; width: auto; display: block; margin: 0 0 6px; }
.footer-brand { font-family: var(--font-head); font-size: 1.5rem; font-weight: 600; margin: 0 0 4px; color: #fff; }
.footer-tagline { margin: 0; color: #cdbfd8; }
.footer-location { margin: 8px 0 0; color: #ecc766; font-weight: 700; letter-spacing: 0.5px; }
.footer-contact p { margin: 0 0 4px; }
.footer-contact a { color: #ecc766; text-decoration: none; }
.footer-contact a:hover { color: #fff; text-decoration: underline; }
.footer-legal { margin-top: 34px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.15); }
.footer-legal p { margin: 0; font-size: 0.85rem; color: #b3a6c0; max-width: 760px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 860px) {
  .cards, .team-grid, .mission-cols { grid-template-columns: 1fr; }
  .mission-cols { gap: 18px; }
  .nav-toggle { display: inline-block; }
  .nav-menu {
    position: absolute; top: 68px; right: 0; left: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream); border-bottom: 1px solid rgba(107,133,96,0.25);
    padding: 8px 16px 16px; display: none; box-shadow: var(--shadow);
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: 14px; border-radius: 8px; }
  .nav-cta { text-align: center; margin-top: 6px; }
  .hero-content { padding: 90px 24px 80px; }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
