/* Limeledge homepage refinements
   Stable hero architecture:
   - text remains left-justified on cream
   - photo stays to the right as one intact layer
   - photo begins underneath an opaque part of the gradient, so there is no hard seam
   - gradient is fully transparent before the left edge of the barn */

.farm-hero {
  position: relative !important;
  display: block !important;
  min-height: 555px !important;
  overflow: hidden !important;
  background: var(--cream-50) !important;
}

/* Modified barn image. Its left edge begins at 34% of the hero.
   The barn itself begins several percent farther right in the source photo. */
.farm-hero__photo {
  position: absolute !important;
  z-index: 0 !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 34% !important;
  width: 66% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
}

.farm-hero__photo img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
}

/* The image begins at 34%, but it is still hidden by cream there.
   The fade completes around 37.2%, just before the visible left end of the barn. */
.farm-hero::before {
  content: "" !important;
  position: absolute !important;
  z-index: 1 !important;
  inset: 0 !important;
  pointer-events: none !important;
  background: linear-gradient(
    90deg,
    rgba(251,248,239,1) 0%,
    rgba(251,248,239,1) 33.8%,
    rgba(251,248,239,.98) 34.4%,
    rgba(251,248,239,.90) 35.0%,
    rgba(251,248,239,.73) 35.6%,
    rgba(251,248,239,.50) 36.2%,
    rgba(251,248,239,.27) 36.7%,
    rgba(251,248,239,.10) 37.0%,
    rgba(251,248,239,0) 37.25%
  ) !important;
}

.farm-hero__content {
  position: relative !important;
  z-index: 2 !important;
  width: 100% !important;
  min-height: 555px !important;
  margin: 0 !important;
  display: flex !important;
  align-items: stretch !important;
  background: transparent !important;
}

.farm-hero__panel {
  width: 32% !important;
  max-width: 605px !important;
  padding:
    clamp(3.15rem, 4.5vw, 4.8rem)
    1.2rem
    clamp(3.15rem, 4.5vw, 4.8rem)
    clamp(3rem, 4vw, 4.5rem) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  background: transparent !important;
}

.farm-hero h1 {
  max-width: 535px !important;
  margin: 0 !important;
  color: var(--forest-950) !important;
  font-size: clamp(2.45rem, 2.65vw, 2.85rem) !important;
  font-weight: 400 !important;
  line-height: 1.08 !important;
  letter-spacing: -0.025em !important;
}

.hero-line {
  display: block !important;
  white-space: nowrap !important;
}

.farm-hero p {
  max-width: 495px !important;
  margin-bottom: 1.75rem !important;
  font-size: 1.08rem !important;
  line-height: 1.48 !important;
}

.farm-hero .button {
  font-size: 0.9rem !important;
  letter-spacing: 0.045em !important;
}

/* Existing homepage refinements */
.arbnet-accreditation {
  padding: clamp(2.25rem, 4vw, 3.5rem) 0;
  background: var(--cream-100);
  border-bottom: 1px solid var(--border);
}

.arbnet-accreditation__inner {
  display: grid;
  grid-template-columns: minmax(250px, 340px) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.arbnet-accreditation__badge {
  padding: .35rem;
  background: var(--white);
  border: 2px solid #111111;
}

.arbnet-accreditation__badge img {
  width: 100%;
  height: auto;
}

.arbnet-accreditation__copy {
  max-width: 680px;
}

.arbnet-accreditation__copy h2 {
  margin: 0 0 .85rem;
  color: var(--forest-950);
  font-size: clamp(2rem, 3.5vw, 3.25rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -.02em;
}

.arbnet-accreditation__copy > p:last-child {
  margin: 0;
  font-size: 1.02rem;
}

.story-gallery img {
  border: 2px solid #111111 !important;
  box-sizing: border-box !important;
}

.site-footer__inner {
  display: grid !important;
  grid-template-columns: auto minmax(240px, 1fr) minmax(250px, auto) auto !important;
  column-gap: clamp(1.5rem, 2.5vw, 2.5rem) !important;
  row-gap: 1rem !important;
  align-items: start !important;
}

.footer-logo {
  display: flex !important;
  justify-content: flex-start !important;
  grid-row: 1 / span 2;
}

.footer-logo__badge {
  background: #ffffff !important;
  border: 2px solid #111111 !important;
  border-radius: 14px !important;
  padding: .45rem .7rem !important;
  box-shadow: 0 5px 0 rgba(0,0,0,.22) !important;
}

.footer-logo__image {
  display: block !important;
  width: 340px !important;
  max-width: 100% !important;
  height: auto !important;
}

.footer-contact {
  display: grid;
  gap: 1rem;
}

.footer-contact__addresses {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.footer-address {
  margin: 0;
  display: flex;
  flex-direction: column;
  color: #e8eee4;
  font-size: .82rem;
  font-style: normal;
  line-height: 1.45;
}

.footer-address strong {
  color: var(--white);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.footer-address__purpose {
  margin: .1rem 0 .35rem;
  color: #cdd8c9;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .67rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.footer-contact__email {
  width: fit-content;
  color: var(--white);
  font-size: .84rem;
  overflow-wrap: anywhere;
  text-underline-offset: .2em;
}

.footer-contact__email:hover {
  color: var(--cream-200);
}

.footer-utility {
  grid-column: 2 / -1;
  grid-row: 2;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  align-self: end;
}

.footer-social,
.header-social {
  display: flex;
  align-items: center;
}

.footer-social {
  gap: .55rem;
  justify-self: end;
}

.header-social {
  gap: .5rem;
}

.social-profile__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: transparent;
  border: 0;
  border-radius: .15rem;
  text-decoration: none;
  transition: opacity 160ms ease;
}

.header-social .social-profile__link {
  width: 2rem;
  height: 2rem;
}

.footer-social .social-profile__link {
  width: 2.2rem;
  height: 2.2rem;
}

.social-profile__link:hover {
  opacity: .72;
}

.social-profile__link:focus-visible {
  opacity: 1;
}

.social-profile__icon {
  width: 1.32rem;
  height: 1.32rem;
  display: block;
}

.social-profile__icon--candid {
  width: 1.5rem;
  height: 1.5rem;
  object-fit: cover;
  border-radius: 50%;
}

.site-footer__action {
  grid-column: 4;
  grid-row: 1;
  justify-self: end;
}

.footer-donate {
  min-height: 44px;
  padding: .72rem 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: var(--red-700);
  border: 2px solid #111111;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
}

.footer-donate:hover {
  background: var(--red-800);
}

@media (max-width: 1100px) {
  .header-social {
    width: min(calc(100% - 2rem), var(--max-width));
    margin-inline: auto;
    padding: .75rem 0 1rem;
    justify-content: flex-start;
    border-top: 1px solid var(--border);
  }

  .site-footer__inner {
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr) !important;
    row-gap: 1.25rem !important;
  }

  .footer-logo {
    grid-row: auto;
  }

  .footer-utility {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .site-footer__action {
    grid-column: 2;
    grid-row: 2;
  }
}

@media (max-width: 1280px) {
  .farm-hero__photo {
    left: 36% !important;
    width: 64% !important;
  }

  .farm-hero::before {
    background: linear-gradient(
      90deg,
      rgba(251,248,239,1) 0%,
      rgba(251,248,239,1) 35.8%,
      rgba(251,248,239,.98) 36.4%,
      rgba(251,248,239,.88) 37.0%,
      rgba(251,248,239,.65) 37.6%,
      rgba(251,248,239,.35) 38.2%,
      rgba(251,248,239,.12) 38.7%,
      rgba(251,248,239,0) 39.0%
    ) !important;
  }

  .farm-hero__panel {
    width: 34% !important;
  }

  .farm-hero h1 {
    font-size: clamp(2.3rem, 2.55vw, 2.6rem) !important;
  }
}

@media (max-width: 900px) {
  .farm-hero {
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .farm-hero__photo {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: 360px !important;
    order: 1 !important;
  }

  .farm-hero::before {
    display: none !important;
  }

  .farm-hero__content {
    order: 2 !important;
    min-height: 0 !important;
    background: var(--cream-50) !important;
  }

  .farm-hero__panel {
    width: 100% !important;
    max-width: none !important;
    padding: 2.5rem 1rem 3rem !important;
  }

  .hero-line {
    white-space: normal !important;
  }

  .site-footer__inner {
    grid-template-columns: 1fr !important;
    justify-items: start !important;
  }

  .site-footer__action {
    grid-column: auto;
    grid-row: auto;
    justify-self: start !important;
  }

  .footer-utility {
    width: 100%;
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 720px) {
  .arbnet-accreditation__inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }

  .arbnet-accreditation__badge {
    width: min(100%, 380px);
    margin-inline: auto;
  }

  .arbnet-accreditation__copy {
    margin-inline: auto;
  }
}

@media (max-width: 620px) {
  .footer-contact__addresses {
    grid-template-columns: 1fr;
  }

  .footer-utility {
    grid-template-columns: 1fr;
    gap: .75rem;
  }

  .footer-social {
    justify-self: start;
  }
}
