/* The Buy page (wholesale-learn-more.html): hero, "A week of ordering local", the side-by-side count and the
   one action. The order itself is the homepage's (gr-acquisition.css, gr-order-invoice.css, gr-network-map.css).
   Colours, radii and shadows come from marketing-tokens.css (Brand Book §5); text is 16 px or more (§6);
   dark text on light surfaces (§21). Motion: CSS transitions only for the step change, GSAP ScrollTrigger only
   for the pin (js/gr-buy.js); both are off under prefers-reduced-motion and the page reads as a plain list. */

/* Section labels: 16 px or more (the homepage's own label is smaller and stays as it is) */
.home .gr-label { color: var(--gr-cloud-primary); font-weight: 650; font-size: 1rem; margin: 0 0 .85rem; }

/* Hero */
.gr-public .home .gr-buy-hero-copy h1 { margin-bottom: 1rem; }
.gr-buy-hero .home-eyebrow { display: inline-flex; }
.gr-buy-hero { padding-block: 3.5rem 4.5rem; }
.gr-buy-hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); column-gap: 3.5rem; align-items: center; }
.gr-buy-hero-copy .home-lead { max-width: 34rem; }
.gr-buy-hero-next { margin-top: 1.25rem; }
.gr-buy-hero-photo img { width: 100%; height: clamp(18rem, 36vw, 30rem); object-fit: cover; border-radius: var(--gr-operator-radius-xl); }
@media (max-width: 899px) {
  .gr-buy-hero { padding-block: 2.5rem 3rem; }
  .gr-buy-hero-grid { grid-template-columns: 1fr; row-gap: 2rem; }
  .gr-buy-hero-photo img { height: 15rem; }
}

/* A week of ordering local */
.gr-week { padding-block: 6rem; border-top: 1px solid var(--gr-cloud-border); }
.gr-week-head { max-width: 40em; margin-bottom: 2.5rem; }
.home .gr-week-head p:last-child { color: var(--gr-cloud-muted); margin-top: 1rem; }
.gr-week-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; counter-reset: week; }
.gr-week-step { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem 3rem; align-items: center;
  padding: 1.75rem; background: var(--gr-cloud-surface); border: 1px solid var(--gr-cloud-border); border-radius: var(--gr-operator-radius-lg); counter-increment: week; }
.gr-week-day { margin: 0 0 .5rem; font-weight: 650; color: var(--gr-cloud-primary); }
.gr-week-day::before { content: counter(week) ". "; }
.gr-week-text h3 { margin-bottom: .75rem; }
.gr-week-text p { color: var(--gr-cloud-muted); }
.gr-week-text p + p { margin-top: .75rem; }
.gr-week-text .home-textlink { color: var(--gr-cloud-primary); }

/* The small picture beside each step: the same farms and quantities as the order above */
.gr-vis { padding: 1.25rem; background: var(--gr-cloud-surface-alt); border-radius: var(--gr-operator-radius-md); display: grid; gap: .6rem; font-size: 1rem; }
.gr-vis-title { margin: 0; font-weight: 650; color: var(--gr-cloud-text); }
.gr-vis-row, .gr-vis-group { display: grid; gap: .1rem .75rem; padding: .6rem .85rem; background: var(--gr-cloud-surface); border-radius: var(--gr-operator-radius-sm); box-shadow: inset 4px 0 0 var(--home-rail, var(--accent)); }
.gr-vis-row { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; align-items: baseline; }
.gr-vis-farm { font-weight: 650; color: var(--gr-cloud-text); }
.gr-vis-item, .gr-vis-qty { color: var(--gr-cloud-muted); }
.gr-vis-foot { margin: 0; font-weight: 650; color: var(--gr-cloud-primary); }
.gr-vis-trace { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.gr-vis-chip { padding: .4rem .8rem; background: var(--gr-cloud-surface); border: 1px solid var(--gr-cloud-control-border); border-radius: var(--gr-operator-radius-pill); font-weight: 600; color: var(--gr-cloud-text); }
.gr-vis-arrow { color: var(--gr-cloud-primary); font-weight: 700; }
@media (max-width: 899px) {
  .gr-week { padding-block: 3.5rem; }
  .gr-week-step { grid-template-columns: 1fr; padding: 1.25rem; }
  .gr-vis-row { grid-template-columns: 1fr; }
}

/* Scene mode: added by js/gr-buy.js only when scrolling motion is allowed on a wide screen.
   The steps stack in one frame, one shown at a time; the rail buttons are the keyboard and touch path. */
.gr-week-rail { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.gr-week-rail button { min-height: 44px; padding: 0 1.1rem; font: inherit; font-weight: 600; color: var(--gr-cloud-text); background: var(--gr-cloud-surface); border: 1px solid var(--gr-cloud-control-border); border-radius: var(--gr-operator-radius-pill); cursor: pointer; transition: background-color .2s, color .2s; }
.gr-week-rail button[aria-current="step"] { background: var(--gr-cloud-primary); border-color: var(--gr-cloud-primary); color: var(--gr-cloud-on-primary); }
.gr-week-scene.is-pinned { display: flex; flex-direction: column; min-height: min(34rem, calc(100vh - 8rem)); }
.gr-week-scene.is-pinned .gr-week-steps { position: relative; flex: 1; display: block; }
.gr-week-scene.is-pinned .gr-week-step { position: absolute; inset: 0; opacity: 0; visibility: hidden; transform: translateY(14px); transition: opacity .45s cubic-bezier(.16, 1, .3, 1), transform .45s cubic-bezier(.16, 1, .3, 1), visibility 0s .45s; }
.gr-week-scene.is-pinned .gr-week-step.is-current { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.gr-week-scene.is-pinned .gr-vis > * { opacity: 0; transform: translateX(12px); }
.gr-week-scene.is-pinned .is-current .gr-vis > * { opacity: 1; transform: none; transition: opacity .5s cubic-bezier(.16, 1, .3, 1), transform .5s cubic-bezier(.16, 1, .3, 1); }
.gr-week-scene.is-pinned .is-current .gr-vis > :nth-child(2) { transition-delay: .08s; }
.gr-week-scene.is-pinned .is-current .gr-vis > :nth-child(3) { transition-delay: .16s; }
.gr-week-scene.is-pinned .is-current .gr-vis > :nth-child(4) { transition-delay: .24s; }
.gr-week-scene.is-pinned .is-current .gr-vis > :nth-child(5) { transition-delay: .32s; }

/* Side by side */
.gr-compare { padding-block: 6rem; background: var(--gr-cloud-surface-alt); }
.gr-compare-head { max-width: 40em; margin-bottom: 2rem; }
.home .gr-compare-head p:last-child { color: var(--gr-cloud-muted); margin-top: 1rem; }
.gr-compare-ctl fieldset { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 1.5rem; padding: 0; border: 0; min-width: 0; }
.gr-compare-ctl legend { float: left; margin: 0 1rem 0 0; padding: 0; font-weight: 650; line-height: 44px; }
.gr-compare-ctl label { position: relative; display: inline-flex; }
.gr-compare-ctl input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.gr-compare-ctl label span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 .9rem; font-weight: 650; background: var(--gr-cloud-surface); border: 1px solid var(--gr-cloud-control-border); border-radius: var(--gr-operator-radius-pill); transition: background-color .2s, color .2s; }
.gr-compare-ctl input:checked + span { background: var(--gr-cloud-primary); border-color: var(--gr-cloud-primary); color: var(--gr-cloud-on-primary); }
.gr-compare-ctl input:focus-visible + span { outline: 3px solid var(--gr-cloud-primary); outline-offset: 3px; }
.gr-compare-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--gr-cloud-surface); border: 1px solid var(--gr-cloud-border); border-radius: var(--gr-operator-radius-lg); overflow: hidden; table-layout: fixed; }
.gr-compare-table th, .gr-compare-table td { padding: 1rem 1.25rem; text-align: left; vertical-align: middle; border-top: 1px solid var(--gr-cloud-border); }
.gr-compare-table thead th { border-top: 0; font-weight: 650; background: var(--gr-cloud-surface-alt); }
.gr-compare-table tbody th { font-weight: 650; width: 28%; }
.gr-compare-table td { font-size: 1.5rem; font-weight: 650; line-height: 1.2; }
.gr-compare-table td.is-one { color: var(--gr-cloud-primary); background: var(--gr-cloud-surface-alt); }
.gr-dots { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .5rem; }
.gr-dots i { width: .7rem; height: .7rem; border-radius: 50%; background: var(--gr-cloud-control-border); }
.gr-compare-table td.is-one .gr-dots i { background: var(--gr-cloud-primary); }
.gr-compare-summary { margin-top: 1.25rem; font-weight: 600; max-width: 46rem; }
.gr-compare-notes { margin: 1.25rem 0 0; padding-left: 1.25rem; max-width: 46rem; color: var(--gr-cloud-muted); }
.gr-compare-notes li { margin-top: .5rem; }
.gr-compare-notes strong { color: var(--gr-cloud-text); }
@media (max-width: 639px) {
  .gr-compare { padding-block: 3.5rem; }
  .gr-compare-table th, .gr-compare-table td { padding: .75rem .5rem; }
  .gr-compare-table thead th { font-size: 1rem; padding-inline: .4rem; }
  .gr-compare-table thead th:nth-child(2) { width: 32%; } .gr-compare-table thead th:nth-child(3) { width: 40%; }
  .gr-compare-table tbody th { width: 28%; font-size: 1rem; }
  .gr-compare-ctl legend { float: none; display: block; width: 100%; margin: 0 0 .5rem; }
  .gr-compare-table td { font-size: 1.25rem; }
}

/* The one action */
.gr-browse { padding-block: 5rem 6rem; }
.gr-browse-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; }
.gr-browse-lead { max-width: 36rem; margin-top: 1rem; color: var(--gr-cloud-muted); }
.gr-browse-act { margin: 0; }
@media (max-width: 639px) { .gr-browse { padding-block: 3.5rem 4rem; } .gr-browse-act, .gr-browse-act .gr-button { width: 100%; } }

@media (prefers-reduced-motion: reduce) {
  .gr-week-scene *, .gr-compare-ctl *, .gr-week-rail * { transition: none !important; }
}
