/* FARM-03: the Pecking Pastures page (/farm) inside Raccoon's shell. Loaded on /farm only.
   Every farm colour is scoped to .pp, never :root, so nothing leaks onto equipment pages.
   Buttons, links and focus rings stay Raccoon's. Design: research/pecking_pastures_design.md §1 and §3. */
.pp {
  --pp-green: #88bc46;       /* logo green: decoration only (2.0:1 on --bg, never text, never the only cue) */
  --pp-green-ink: #47701E;   /* farm green for text: 5.8:1 on white, 5.2:1 on --bg, 5.3:1 on the tint */
  --pp-green-tint: #F1F6E8;  /* section wash: --ink 14.8:1, --muted 5.7:1 */
  --pp-sun: #fcb040;         /* sun orange: rules and fills under --ink text (8.8:1), never text */
  --pp-sun-tint: #FEF3DF;    /* pickup box: --ink 14.8:1, --muted 5.7:1 */
  --accent: var(--pp-sun);   /* Raccoon's red heading rule turns sun-orange inside the farm page only */
}
.pp picture { display: contents; }   /* the <img> inside sizes against the figure/tile, as a bare <img> would */
.pp picture > source { display: none; }   /* else <source> becomes an empty grid/flex item (srcset choice is unaffected) */
.pp-preview { margin-top: var(--s5); }

.pp-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: var(--s10); align-items: center; padding: var(--s8) 0 var(--s6); }
.pp-logo { margin: 0; }
.pp-logo img { display: block; width: 100%; max-width: 560px; height: auto; margin: 0; }
.pp-lead { font-size: calc(var(--t-body) + 3px); line-height: 1.5; color: var(--ink-2); margin: var(--s4) 0 0; max-width: 40ch; }
.pp-note { margin: var(--s3) 0 0; color: var(--ink); font-weight: 600; max-width: 48ch; }
.pp-ctas { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s6); }
.pp-ctas .btn { width: auto; padding: 0 var(--s6); }
.pp-hero-photo { margin: 0; aspect-ratio: 4 / 3; border-radius: var(--r-photo); overflow: hidden; box-shadow: var(--panel-shadow); background: var(--surface-2);
                 border-bottom: 6px solid var(--pp-green); }
.pp-hero-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }

.pp-sec { margin-top: var(--s12); }
.pp-sec > h2, .pp-h2 { margin: 0 0 var(--s4); }
.pp-sec > h2::after, .pp-h2::after { content: ""; display: block; width: 52px; height: 3px; background: var(--accent); margin-top: var(--s3); }
.pp-wash { background: var(--pp-green-tint); border-radius: var(--r-panel); padding: var(--s8); }

/* "From the farm": one tile per kind, live stock inside */
.pp-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); list-style: none; margin: 0; padding: 0; }
.pp-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--panel-shadow); }
.pp-tile > picture img, .pp-tile > img { display: block; aspect-ratio: 4 / 3; width: 100%; height: auto; object-fit: cover; }
.pp-tile .pp-noimg { aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--pp-sun-tint); }
.pp-tile .pp-noimg img { width: 55%; height: auto; aspect-ratio: auto; object-fit: contain; }
.pp-tile-body { padding: var(--s4) var(--s5) var(--s5); display: flex; flex-direction: column; gap: var(--s2); flex: 1; }
.pp-tile h3 { font-family: var(--font-head); font-size: 19px; font-weight: 700; margin: 0; }
.pp-tile p { color: var(--ink-2); font-size: 15px; margin: 0; }
.pp-stock { margin-top: auto !important; padding-top: var(--s2); display: grid; gap: var(--s2); list-style: none; margin: 0; padding-left: 0; }
.pp-stock li { display: grid; gap: var(--s2); border-top: 1px solid var(--line); padding-top: var(--s3); }
.pp-stock .row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s2); flex-wrap: wrap; }
.pp-stock .nm { font-weight: 600; }
.pp-stock .pr { font-weight: 700; }
.pp-stock .pr span { font-weight: 500; color: var(--muted); }
.pp-stock .pp-item-note { font-size: var(--t-small); color: var(--muted); }
.pp-stock .btn { min-height: var(--tap); font-size: 15px; }
.pp-avail { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-meta); font-weight: 700; color: var(--pp-green-ink); }
.pp-avail::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--pp-green-ink); }
.pp-later { margin-top: auto !important; padding-top: var(--s3); border-top: 1px solid var(--line); font-size: var(--t-small) !important; color: var(--muted) !important; }

.pp-pickup { margin-top: var(--s6); padding: var(--s4) var(--s5); background: var(--pp-sun-tint); border-left: 4px solid var(--pp-sun); border-radius: var(--r-ctl); color: var(--ink); font-size: 15px; }
.pp-reserve { margin-top: var(--s8); max-width: 820px; }
.pp-reserve .f-three { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 2fr); }

/* "Our story" */
.pp-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s8); align-items: center; }
.pp-split + .pp-split { margin-top: var(--s10); }
.pp-split.flip > figure { order: 2; }
.pp-split figure { margin: 0; }
.pp-split figure img { display: block; border-radius: var(--r-photo); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; height: auto; max-height: 520px; }
.pp-split h3 { font-family: var(--font-head); font-size: var(--t-h2); font-weight: 700; margin: 0 0 var(--s3); }
.pp-split p { color: var(--ink-2); max-width: 62ch; }

/* "Meet the owners" */
.pp-owners-intro { max-width: 62ch; color: var(--ink-2); }
.pp-owners { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); margin-top: var(--s5); }
.pp-owner { background: var(--surface); border-radius: var(--r-panel); border: 1px solid var(--line); display: grid; grid-template-columns: 180px minmax(0, 1fr); overflow: hidden; }
.pp-owner img { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 5; }
.pp-owner > div { padding: var(--s5); }
.pp-owner h3 { font-family: var(--font-head); font-size: 20px; margin: 0 0 var(--s2); }
.pp-owner p { font-size: 15px; color: var(--ink-2); }

/* "Around the farm" */
.pp-gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); }
.pp-gallery a { display: block; border-radius: var(--r-thumb); overflow: hidden; aspect-ratio: 1; background: var(--surface-2); cursor: zoom-in; }
.pp-gallery img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.pp-gallery a:hover img { transform: scale(1.03); }

/* "Get in touch" */
.pp-contact { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s8); align-items: center; }
.pp-contact-links { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s4); }
.pp-contact-links .btn { width: auto; padding: 0 var(--s5); }
.pp-contact-links .ico { width: 18px; height: 18px; }
.pp-badges { display: flex; gap: var(--s5); align-items: center; }
.pp-badges .pp-cartoon { height: 150px; width: auto; }
.pp-npip { display: grid; gap: var(--s2); justify-items: center; font-size: var(--t-meta); color: var(--muted); text-align: center; max-width: 130px; margin: 0; }
.pp-npip img { height: 110px; width: auto; }

@media (max-width: 1100px) { .pp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .pp-hero { grid-template-columns: minmax(0, 1fr); gap: var(--s6); padding-top: var(--s5); }
  .pp-split, .pp-owners, .pp-contact { grid-template-columns: minmax(0, 1fr); }
  .pp-split.flip > figure { order: 0; }
  .pp-split figure img { aspect-ratio: 4 / 3; }
  .pp-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .pp-logo img { max-width: 100%; margin: 0 auto; }
  .pp-lead { font-size: calc(var(--t-body) + 1px); }
  .pp-ctas .btn { width: 100%; }
  .pp-tiles { grid-template-columns: minmax(0, 1fr); }
  .pp-tile > picture img, .pp-tile > img, .pp-tile .pp-noimg { aspect-ratio: 16 / 9; }
  .pp-wash { padding: var(--s5) var(--s4); margin-left: calc(-1 * var(--wrap-pad)); margin-right: calc(-1 * var(--wrap-pad)); border-radius: 0; }
  .pp-owner { grid-template-columns: 120px minmax(0, 1fr); }
  .pp-owner > div { padding: var(--s4); }
  .pp-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
  .pp-reserve .f-three { grid-template-columns: 1fr; }
  .pp-badges .pp-cartoon { height: 120px; }
}
@media (prefers-reduced-motion: reduce) { .pp-gallery img { transition: none; } }

/* FARM-09 photo viewer: tap a gallery photo to open it; tap anywhere outside the photo (or Esc, or Close) to close */
.pp-view { border: 0; padding: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none;
           background: transparent; display: none; align-items: center; justify-content: center; cursor: zoom-out; }
.pp-view[open] { display: flex; }
.pp-view::backdrop { background: rgba(0, 0, 0, .86); }
.pp-view img { max-width: min(94vw, 1400px); max-height: 86dvh; width: auto; height: auto; border-radius: var(--r-photo);
               box-shadow: 0 10px 40px rgba(0, 0, 0, .5); cursor: default; }
.pp-view-close { position: fixed; top: 12px; right: 12px; min-width: var(--tap); min-height: var(--tap); padding: 0 16px;
                 border: 0; border-radius: 999px; background: rgba(255, 255, 255, .92); color: #111; font: inherit; font-weight: 600; cursor: pointer; }
