/* ===================================================================
   Amen Farms — brand stylesheet
   Palette: sampled from the Amen Farms badge logo — deep brushed green +
   terracotta ring + warm cream + sun orange (sparing accent)
   Type: Fraunces (display) + Nunito Sans (body) · 8px spacing scale
   =================================================================== */

:root {
  /* palette */
  --cream:      #f5ecdb;   /* page background — warm cream, badge sky/letters */
  --cream-2:    #f3e7d3;   /* deeper cream */
  --sage:       #e7ecdf;   /* muted sage — section alternation */
  --paper:      #fffdf8;   /* card surface */
  --green:      #3b4b39;   /* primary green — badge outer ring / hill shadow */
  --green-deep: #293528;   /* darkest green — footer, hover */
  --green-700:  #6e774e;   /* mid pasture green — badge hillside, lighter accent */
  --barn:       #9a5435;   /* terracotta — badge ring, accent (was barn red) */
  --barn-dark:  #7b432a;
  --sun:        #c17a45;   /* sun orange — badge sunburst, sparing highlight only */
  --ink:        #2b2b26;   /* charcoal text */
  --ink-soft:   #6f6658;   /* muted text */
  --line:       #e3d9c6;   /* hairline */
  --line-2:     #d9cdb6;
  --wheat-soft: #f0e2c4;   /* photo placeholder tint */

  /* spacing scale (8px base) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 80px;

  --radius: 14px;          /* frames */
  --radius-card: 10px;     /* cards, gallery */
  --shadow: 0 10px 24px -10px rgba(34, 46, 26, .28);
  --shadow-sm: 0 4px 12px -6px rgba(34, 46, 26, .22);
  --maxw: 1100px;
}

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

body {
  font-family: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand-name {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  line-height: 1.18;
  color: var(--green);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.hero p, .page-head p, .section-sub, .prose .lede { text-wrap: pretty; }

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

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

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

/* ---------------- header / logo lockup ---------------- */

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--s4);
  flex-wrap: wrap;
  padding: var(--s3) 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--s3);
  text-decoration: none;
  margin-right: auto;
}

.brand-mark-img {
  width: 58px;
  height: 58px;
  flex: none;
}

.brand-name {
  display: block;
  font-size: 1.5rem;
  color: var(--green);
  line-height: 1.05;
}

.brand-tag {
  display: block;
  font-family: "Nunito Sans", sans-serif;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 2px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1);
}

.site-nav a {
  position: relative;
  text-decoration: none;
  color: var(--green);
  font-weight: 700;
  font-size: .96rem;
  padding: 12px 14px;
  border-radius: 8px;
  transition: color .15s, background .15s;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 6px;
  height: 2px;
  background: var(--barn);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .18s ease;
}

.site-nav a:hover { color: var(--green-deep); }
.site-nav a:hover::after { transform: scaleX(.5); }
.site-nav a.active { color: var(--green-deep); }
.site-nav a.active::after { transform: scaleX(1); }

/* ---------------- buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 800;
  font-size: .98rem;
  min-height: 44px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
  transition: transform .12s, box-shadow .15s, background .15s, color .15s;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--green); color: #fff; border-color: var(--green); }
.btn-primary:hover { background: var(--green-deep); border-color: var(--green-deep); color: #fff; box-shadow: var(--shadow-sm); }

.btn-secondary { background: transparent; color: var(--green); border-color: var(--green); }
.btn-secondary:hover { background: var(--sage); color: var(--green-deep); }

.btn-hero-alt { background: transparent; color: #fff; border-color: rgba(255,255,255,.75); }
.btn-hero-alt:hover { background: rgba(255,255,255,.14); color: #fff; }

.btn-lg { min-height: 52px; padding: 15px 30px; font-size: 1.05rem; }
.btn-small { min-height: 40px; padding: 9px 18px; font-size: .88rem; }

/* sun-orange focus ring — sparing accent, echoes the badge sunburst */
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(193, 122, 69, .38);
}

/* ---------------- photo hero (home) ---------------- */

.hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(460px, 70vh, 620px);
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 44%;
  z-index: -2;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 90% at 50% 42%, rgba(24,40,28,.30) 0%, rgba(24,40,28,.52) 66%, rgba(20,34,24,.72) 100%),
    linear-gradient(180deg, rgba(24,40,28,.42) 0%, rgba(24,40,28,.10) 34%, rgba(20,34,24,.72) 100%);
}
.hero-inner {
  text-align: center;
  color: #fff;
  max-width: 760px;
  margin: 0 auto;
  padding: var(--s8) var(--s5);
}
.hero-seal {
  width: 116px;
  height: 116px;
  margin: 0 auto var(--s5);
  filter: drop-shadow(0 4px 14px rgba(0,0,0,.35));
}
.hero h1 {
  color: #fff;
  font-size: clamp(2rem, 4.8vw, 3.35rem);
  max-width: 15em;
  margin: 0 auto;
  text-shadow: 0 2px 18px rgba(0,0,0,.32);
}
.hero p {
  margin: var(--s4) auto 0;
  max-width: 34em;
  font-size: clamp(1.02rem, 1.8vw, 1.22rem);
  color: #f1ede1;
  text-shadow: 0 1px 12px rgba(0,0,0,.34);
}
.hero-actions {
  margin-top: var(--s6);
  display: flex;
  gap: var(--s3);
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------------- interior page head ---------------- */

.page-head {
  background: var(--green);
  color: #fff;
  padding: var(--s7) 0 calc(var(--s7) + var(--s1));
  background-image:
    radial-gradient(130% 100% at 82% -10%, rgba(255,255,255,.08) 0 42%, transparent 43%),
    radial-gradient(120% 110% at 8% 130%, rgba(0,0,0,.14) 0 40%, transparent 41%);
}
.page-head h1 { color: #fff; font-size: clamp(1.9rem, 3.8vw, 2.7rem); }
.page-head p {
  margin-top: var(--s2);
  max-width: 46em;
  color: #e6eedd;
  font-size: 1.06rem;
}

/* ---------------- sections ---------------- */

.section { padding: var(--s7) 0; }
.section-title { font-size: 1.75rem; margin-bottom: var(--s1); }
.section-sub {
  color: var(--ink-soft);
  margin-bottom: var(--s6);
  max-width: 46em;
}
.band-alt { background: var(--sage); }

/* ---------------- goat cards ---------------- */

.goat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: var(--s5);
}

/* Does / Bucks / Wethers sections (Our Goats + For Sale pages) — each holds its own
   .goat-grid, stacked with a quiet rule-and-count heading between them. */
.goat-sections { display: flex; flex-direction: column; gap: var(--s8); }
.goat-group-title {
  font-size: 1.4rem;
  margin-bottom: var(--s5);
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--line);
}
.goat-group-count {
  font-family: "Nunito Sans", sans-serif;
  font-weight: 700;
  font-size: .85rem;
  color: var(--ink-soft);
}

.goat-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .16s, box-shadow .16s;
}
.goat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 30px -12px rgba(34, 46, 26, .32);
}

.goat-photo {
  aspect-ratio: 4 / 3;
  background: var(--wheat-soft);
  position: relative;
}
.goat-photo img { width: 100%; height: 100%; object-fit: cover; }

.no-photo {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  color: var(--ink-soft);
  font-weight: 700;
  font-size: .9rem;
  background: repeating-linear-gradient(45deg, var(--cream-2) 0 16px, var(--wheat-soft) 16px 32px);
}
.no-photo svg { width: 30px; height: 30px; opacity: .5; }

.badge {
  position: absolute;
  top: var(--s3);
  left: var(--s3);
  z-index: 3;
  background: var(--barn);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.badge-herd { background: var(--green-700); }

/* photo carousel */
.gcar { position: absolute; inset: 0; }
.gcar img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .25s;
}
.gcar img.on { opacity: 1; }
.gnav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 38px; height: 38px; border: none; border-radius: 999px; cursor: pointer;
  background: rgba(34,46,26,.45); color: #fff; font-size: 1.4rem; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: background .15s;
}
.gnav:hover { background: rgba(34,46,26,.72); }
.gnav.prev { left: var(--s2); }
.gnav.next { right: var(--s2); }
.gdots {
  position: absolute; bottom: 10px; left: 0; right: 0; z-index: 2;
  display: flex; gap: 5px; justify-content: center;
}
.gdots span {
  width: 7px; height: 7px; border-radius: 999px; background: rgba(255,255,255,.6);
  cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.gdots span.on { background: var(--sun); }

.goat-body { padding: var(--s4) var(--s4) var(--s5); display: flex; flex-direction: column; flex: 1; }

.goat-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
}
.goat-name { font-size: 1.28rem; }

/* price = quiet badge */
.goat-price {
  flex: none;
  font-weight: 800;
  font-size: .84rem;
  color: var(--green);
  background: var(--sage);
  border: 1px solid var(--line-2);
  padding: 4px 11px;
  border-radius: 999px;
  white-space: nowrap;
}

.goat-meta {
  margin: var(--s2) 0 var(--s3);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  background: var(--cream-2);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: .76rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.goat-desc { font-size: .93rem; color: var(--ink); flex: 1; }
.goat-actions { margin-top: var(--s4); }

.empty-note {
  background: var(--paper);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  padding: var(--s6);
  text-align: center;
  color: var(--ink-soft);
}

/* ---------------- prose / about ---------------- */

.prose { max-width: 700px; }
.prose h2 { font-size: 1.5rem; margin: var(--s6) 0 var(--s3); }
.prose h2:first-child { margin-top: 0; }
.prose p + p { margin-top: var(--s3); }
.prose .lede { font-size: 1.15rem; color: var(--ink); }

.two-col {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: var(--s7);
  align-items: start;
}

.eyebrow {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--barn);
  margin-bottom: var(--s2);
}

/* about page: 2-wide photo grid that scrolls */
.gallery-head {
  display: flex; align-items: baseline; gap: var(--s3);
  font-size: 1.15rem; margin: 0 0 var(--s3); color: var(--green);
  font-family: "Fraunces", Georgia, serif;
}
.about-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s2);
  max-height: 470px;
  overflow-y: auto;
  padding: var(--s1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  scrollbar-width: thin;
}
.about-gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-card);
  cursor: zoom-in;
  background: var(--wheat-soft);
  transition: transform .15s;
}
.about-gallery img:hover { transform: scale(1.02); }

.fact-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: var(--s5);
  margin-top: var(--s5);
}
.fact-card h3 { font-size: 1.12rem; margin-bottom: var(--s3); }
.fact-list { list-style: none; }
.fact-list li {
  display: flex; align-items: flex-start; gap: var(--s3);
  padding: 7px 0;
  color: var(--ink);
  font-size: .96rem;
  border-top: 1px solid var(--line);
}
.fact-list li:first-child { border-top: none; }
.fact-list svg { width: 20px; height: 20px; flex: none; color: var(--green); margin-top: 2px; }

/* lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(20, 30, 20, .90);
  display: none; align-items: center; justify-content: center;
  z-index: 100; padding: var(--s5); cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 96%; max-height: 92%;
  border-radius: var(--radius-card);
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.lightbox .lb-close {
  position: absolute; top: var(--s4); right: var(--s5);
  font-size: 2.2rem; color: #fff; line-height: 1; cursor: pointer; opacity: .85;
}
.lightbox .lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border: none; border-radius: 999px;
  background: rgba(255,255,255,.16); color: #fff; font-size: 1.7rem; cursor: pointer;
}
.lightbox .lb-nav.prev { left: var(--s4); }
.lightbox .lb-nav.next { right: var(--s4); }
.lightbox .lb-nav:hover { background: rgba(255,255,255,.3); }

/* ---------------- values strip (home) ---------------- */

.value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--s5);
}
.value-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s5);
  box-shadow: var(--shadow-sm);
}
.value-card .icon {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: var(--sage);
  color: var(--green);
  margin-bottom: var(--s3);
}
.value-card .icon svg { width: 23px; height: 23px; }
.value-card h3 { margin: 0 0 var(--s1); font-size: 1.1rem; }
.value-card p { font-size: .92rem; color: var(--ink-soft); }

/* ---------------- home visit teaser ---------------- */

.addr-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: var(--s5) var(--s5);
}
.addr-card h3 { font-size: 1.16rem; margin-bottom: var(--s2); display: flex; align-items: center; gap: var(--s2); }
.addr-card h3 svg { width: 20px; height: 20px; color: var(--green); flex: none; }

/* ---------------- contact form ---------------- */

.form-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: var(--s6);
  max-width: 620px;
}
.form-row { margin-bottom: var(--s4); }
.form-row label {
  display: block;
  font-weight: 800;
  font-size: .9rem;
  margin-bottom: var(--s2);
  color: var(--green);
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  font: inherit;
  padding: 11px 13px;
  border: 1.5px solid var(--line-2);
  border-radius: var(--radius-card);
  background: #fff;
  color: var(--ink);
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(45, 74, 50, .16);
}
.form-hint { font-size: .82rem; color: var(--ink-soft); margin-top: var(--s1); }

/* ---------------- location ---------------- */

.map-frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 6px solid var(--paper);
}
.map-frame iframe { display: block; width: 100%; height: 440px; border: 0; }

.photo-frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 6px solid var(--paper);
}

/* ---------------- footer ---------------- */

.site-footer {
  margin-top: var(--s7);
  background: var(--green-deep);
  color: #d7e2cd;
  padding: var(--s8) 0 var(--s6);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: var(--s7);
  align-items: start;
}
.footer-brand .footer-seal { width: 90px; height: 90px; margin-bottom: var(--s3); }
.footer-brand p { max-width: 26em; color: #c7d4bc; }
.site-footer h3 {
  color: #fff;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-family: "Nunito Sans", sans-serif;
  font-weight: 800;
  margin-bottom: var(--s3);
}
.site-footer a { color: #e8dfca; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: var(--s2); }
.footer-nap { font-style: normal; line-height: 1.7; color: #d7e2cd; }
.footer-nap strong { color: #fff; font-weight: 800; }

.footer-bottom {
  margin-top: var(--s7);
  padding-top: var(--s4);
  border-top: 1px solid rgba(255,255,255,.14);
  font-size: .85rem;
  color: #9fb094;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s2);
}

/* ---------------- breed cross-link band (Our Goats · For Sale · breed pages) ---------------- */

.breed-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--s2) var(--s3);
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--barn);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  padding: var(--s3) var(--s5);
  margin-bottom: var(--s6);
}
.breed-nav .breed-nav-label {
  font-family: "Nunito Sans", sans-serif;
  font-weight: 800;
  font-size: .72rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-right: var(--s1);
}
.breed-nav a { font-weight: 800; text-decoration: none; }
.breed-nav a:hover { text-decoration: underline; }
.breed-nav .breed-nav-current { font-weight: 800; color: var(--green); }
.breed-nav .breed-nav-sep { color: var(--line-2); }

/* ---------------- bundle deals box (For Sale) ---------------- */

.deals-card {
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-top: 5px solid var(--barn);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: var(--s5) var(--s6) var(--s6);
  margin-bottom: var(--s7);
}
.deals-card h2 { color: var(--barn-dark); font-size: 1.5rem; margin-bottom: var(--s2); }
.deals-card .deals-intro { color: var(--ink-soft); margin-bottom: var(--s3); max-width: 52em; }
.deals-list { list-style: none; }
.deals-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  padding: var(--s3) 0;
  border-top: 1px solid var(--line);
  font-size: 1rem;
  color: var(--ink);
}
.deals-list li:first-child { border-top: none; }
.deals-list svg { width: 22px; height: 22px; flex: none; color: var(--barn); margin-top: 2px; }
.deals-list strong { color: var(--green); }

/* ---------------- breed page prose extras ---------------- */

.prose-wide { max-width: 760px; margin-left: auto; margin-right: auto; }
.prose h3 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.16rem;
  color: var(--green);
  margin: var(--s5) 0 var(--s2);
}
.prose ul { margin: var(--s3) 0; padding-left: var(--s5); }
.prose li { margin-bottom: var(--s2); }
.prose li::marker { color: var(--barn); }
.photo-frame img { width: 100%; height: auto; }
.breed-aside-note {
  margin-top: var(--s4);
  font-size: .96rem;
  color: var(--ink-soft);
}

/* ---------------- misc ---------------- */

.notice {
  background: var(--sage);
  border: 1px solid var(--line-2);
  border-left: 4px solid var(--green);
  border-radius: var(--radius-card);
  padding: var(--s4) var(--s5);
  font-size: .94rem;
}

.centered-page { text-align: center; padding: var(--s9) 0; }
.centered-page .mark {
  width: 84px; height: 84px; margin: 0 auto var(--s4);
}
.centered-page h1 { margin-bottom: var(--s3); }
.centered-page .section-sub { margin: 0 auto var(--s6); }
.centered-page .btn + .btn { margin-left: var(--s2); }

/* ---------------- responsive ---------------- */

@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s6); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .two-col { grid-template-columns: 1fr; gap: var(--s6); }
}

@media (max-width: 640px) {
  .header-inner { justify-content: center; }
  .brand { margin-right: 0; }
  .site-nav { justify-content: center; }
  .hero-inner { padding: var(--s7) var(--s5); }
  .footer-grid { grid-template-columns: 1fr; gap: var(--s6); }
  .footer-bottom { justify-content: center; text-align: center; }
}
