.gd-farm {
  --farm-ink: #f7f2e6;
  --farm-green: var(--green);
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  overflow: hidden;
  padding: clamp(28px, 5vh, 58px) 0 46px;
  color: var(--farm-ink);
  background: #34402b;
}
.gd-farm .gd-farm-scene,
.gd-farm .gd-farm-shade,
.gd-farm .gd-farm-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.gd-farm .gd-farm-scene {
  z-index: -3;
  background: url("graindash-prairie-harvest.jpg") center 58% / cover no-repeat;
  transform: scale(1.025);
}
.gd-farm .gd-farm-shade {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(18, 29, 20, .76) 0%, rgba(20, 31, 21, .60) 34%, rgba(24, 32, 22, .18) 66%, rgba(25, 31, 22, .10) 100%),
    linear-gradient(0deg, rgba(16, 22, 16, .44) 0%, rgba(20, 27, 19, .04) 43%, rgba(31, 39, 28, .08) 100%);
}
.gd-farm .gd-farm-grain {
  z-index: -1;
  opacity: .08;
  background-image: radial-gradient(rgba(250, 235, 204, .34) .65px, transparent .65px);
  background-size: 7px 7px;
  mask-image: linear-gradient(90deg, #000, transparent 78%);
}
.gd-farm .gd-farm-wrap {
  width: min(1320px, calc(100% - 64px));
  margin: 0 auto;
}
.gd-farm .gd-farm-copy {
  position: relative;
  z-index: 2;
  width: min(760px, 64%);
}
.gd-farm .hero-logo {
  width: clamp(205px, 23vw, 330px);
  margin: 0 0 27px;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,.55));
}
.gd-farm h1 {
  max-width: 740px;
  text-align: left;
  font-size: clamp(3.7rem, 6.8vw, 6.6rem);
  line-height: .9;
  letter-spacing: .005em;
  text-shadow: 0 4px 26px rgba(0,0,0,.35);
}
.gd-farm h1 .grad { color: var(--green); }
.gd-farm .hero-chips {
  width: 840px;
  max-width: calc(100vw - 64px);
  justify-content: flex-start;
  gap: 10px;
  margin-top: 15px;
}
.gd-farm .chip {
  border: 1px solid rgba(237, 230, 205, .29);
  color: #f6f0e4;
  background: rgba(17, 26, 18, .67);
  border-radius: 8px;
  padding: 11.5px 15px;
  font-size: .95rem;
  backdrop-filter: blur(8px);
}
.gd-farm .chip svg { width: 17px; height: 17px; stroke: var(--green-hi); }
.gd-farm .hero-cta { justify-content: flex-start; gap: 16px; margin-top: 26px; }
.gd-farm .hero-cta .btn { border-radius: 7px; }
.gd-farm .hero-cta .btn { padding: 15px 30px; font-size: 1.15rem; }
.gd-farm .btn.primary {
  color: #06210a;
  background: linear-gradient(180deg,var(--green-hi),var(--green));
  box-shadow: 0 8px 22px rgba(7, 14, 8, .28);
}
.gd-farm .btn.primary:hover { box-shadow: 0 10px 30px rgba(40,189,53,.4); }
.gd-farm .btn.ghost {
  color: #fff8eb;
  background: rgba(17, 26, 18, .42);
  border-color: rgba(245, 238, 220, .48);
}
.gd-farm .gd-farm-devices {
  position: absolute;
  z-index: 1;
  right: max(2.2vw, calc((100vw - 1440px) / 2));
  bottom: clamp(35px, 5vh, 55px);
  width: min(59.5vw, 815px);
  height: clamp(287px, 35.5vw, 491px);
  pointer-events: none;
  animation: farm-devices-arrive .85s cubic-bezier(.2,.75,.25,1) .12s both;
}
.gd-farm .gd-farm-laptop {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 25px 32px rgba(0,0,0,.55));
}
.gd-farm .gd-farm-phone {
  position: absolute;
  width: clamp(92px, 10.45vw, 148px);
  height: auto;
  right: 1%;
  bottom: -2px;
  filter: drop-shadow(0 18px 23px rgba(0,0,0,.68));
}
@keyframes farm-devices-arrive {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (min-width: 1500px) {
  .gd-farm { min-height: 860px; }
}
@media (min-width: 901px) and (max-height: 850px) {
  .gd-farm .hero-chips { max-width: 470px; }
}
@media (min-width: 901px) and (max-width: 1100px),
       (min-width: 1101px) and (max-height: 850px) {
  /* Reserve separate columns instead of squeezing an absolute device layer
     behind the copy when a desktop window is narrow, short, or zoomed in. */
  .gd-farm .gd-farm-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
    align-items: end;
  }
  .gd-farm .gd-farm-copy { width: 100%; min-width: 0; }
  .gd-farm h1 { font-size: clamp(3rem, 5.1vw, 6.6rem); }
  .gd-farm h1 .nw { display: block; }
  .gd-farm .hero-chips {
    display: grid;
    grid-template-columns: repeat(2, minmax(min-content, max-content));
    width: fit-content;
    max-width: 100%;
    justify-content: start;
  }
  .gd-farm .chip { min-width: 0; max-width: 100%; line-height: 1.2; }
  .gd-farm .gd-farm-devices {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 1.73;
    margin: 0;
  }
  .gd-farm .gd-farm-phone { width: 18.2%; }
}
@media (max-width: 900px) {
  .gd-farm { min-height: auto; padding: 44px 0 30px; }
  .gd-farm .gd-farm-wrap { width: min(720px, calc(100% - 44px)); }
  .gd-farm .gd-farm-copy { width: 100%; }
  .gd-farm h1 { font-size: clamp(3.2rem, 9vw, 5.5rem); }
  .gd-farm .hero-chips { width: 100%; max-width: 700px; }
  .gd-farm .gd-farm-devices {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: min(100%, 680px);
    height: auto;
    aspect-ratio: 1.68;
    margin: 20px auto -20px;
  }
  .gd-farm .gd-farm-phone { width: clamp(90px, 18vw, 130px); }
  .gd-farm .gd-farm-shade {
    background: linear-gradient(180deg, rgba(16,25,17,.83), rgba(16,25,17,.63) 53%, rgba(12,19,13,.78));
  }
}
@media (max-width: 540px) {
  .gd-farm { padding: 34px 0 20px; }
  .gd-farm .gd-farm-wrap { width: calc(100% - 36px); }
  .gd-farm .hero-logo { width: min(235px, 72vw); margin-bottom: 22px; }
  .gd-farm h1 { font-size: clamp(2.4rem, 11.5vw, 4rem); line-height: .92; }
  .gd-farm h1 .nw { display: block; white-space: nowrap; }
  .gd-farm .hero-chips {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
    background: none;
    border: 0;
    padding: 0;
    overflow: visible;
    backdrop-filter: none;
    box-shadow: none;
  }
  .gd-farm .chip {
    min-height: 59px;
    gap: 8px;
    padding: 9px;
    border: 1px solid rgba(234, 229, 209, .23);
    border-radius: 7px;
    font-size: .83rem;
    line-height: 1.2;
    background: rgba(13, 22, 15, .76);
  }
  .gd-farm .chip svg { width: 24px; height: 24px; flex: 0 0 24px; padding: 0; background: none; border: 0; border-radius: 0; }
  .gd-farm .hero-cta { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 20px; }
  .gd-farm .hero-cta .btn { width: 100%; padding: 14px 18px; font-size: 1.15rem; }
  .gd-farm .gd-farm-scene { background-position: 67% center; }
  .gd-farm .gd-farm-devices { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .gd-farm *, .gd-farm *::before, .gd-farm *::after { animation: none !important; transition: none !important; }
}
