/* Landing page at "/" (home feature). Uses only R1's tokens from site.css (derived sizes via calc on tokens);
   media queries use the literal px of --bp-sm 600 / --bp-md 900 / --bp-lg 1100, as site.css does. */

/* ===== hero: name, one line, facts, two actions; a real inventory photo beside it ===== */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--s10); align-items: center; padding: var(--s10) 0 var(--s4); }
.hero.no-photo { grid-template-columns: minmax(0, 1fr); }
.hero-text { min-width: 0; }
.hero h1 { font-size: calc(var(--t-h1) * 1.5); line-height: 1.08; color: var(--brand); margin: 0; letter-spacing: -.01em; }
.hero h1::after { content: ""; display: block; width: 52px; height: 3px; background: var(--accent, var(--gold)); margin-top: var(--s4); } /* shared-edit(brand01): the logo's red rule */
.hero-lead { font-size: calc(var(--t-body) + 3px); line-height: 1.45; color: var(--ink-2); margin: var(--s4) 0 0; max-width: 34ch; }
.hero-facts { list-style: none; margin: var(--s4) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s1) 0; font-size: var(--t-small); color: var(--muted); }
.hero-facts li { display: inline-flex; align-items: center; gap: 6px; }
.hero-facts li + li::before { content: "·"; margin: 0 var(--s2); color: var(--line-strong); }
.hero-facts b { color: var(--ink); font-weight: 700; }
.hero-pickup { display: flex; align-items: center; gap: 6px; margin: var(--s2) 0 0; font-size: var(--t-small); color: var(--muted); }
.hero-pickup .ico { width: 15px; height: 15px; color: var(--brand); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s6); }
.hero-ctas .btn { width: auto; padding: 0 var(--s6); }
.hero-n { display: inline-block; min-width: 28px; padding: 1px 7px; border-radius: var(--r-badge); background: var(--brand-hover); color: var(--cta-ink);
          font-size: var(--t-small); font-weight: 700; line-height: 1.5; }
.hero-num { font-weight: 500; color: var(--muted); }
.hero-search { display: flex; gap: var(--s2); margin-top: var(--s5); max-width: 520px; }
.hero-search .search { flex: 1; width: auto; }

.hero-photo { position: relative; margin: 0; min-width: 0; }
.hero-photo > a { display: block; aspect-ratio: 4 / 3; border-radius: var(--r-photo); overflow: hidden; background: var(--surface-2); box-shadow: var(--panel-shadow); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo figcaption { position: absolute; left: var(--s4); bottom: var(--s4); max-width: calc(100% - 2 * var(--s4)); }
.hero-photo figcaption a { display: flex; align-items: center; flex-wrap: wrap; gap: 2px var(--s3); min-height: var(--tap); padding: var(--s2) var(--s4);
                           background: var(--surface); color: var(--ink); text-decoration: none; border-radius: var(--r-ctl); box-shadow: var(--e2); }
.hero-photo figcaption a:hover .cap-t { text-decoration: underline; }
.cap-k { flex-basis: 100%; font-size: var(--t-eyebrow); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cap-t { font-weight: 600; font-size: var(--t-small); }
.cap-p { font-weight: 700; font-size: var(--t-small); }
.cap-p span { font-weight: 500; color: var(--muted); }
.hero-photo figcaption .ico { color: var(--brand); width: 16px; height: 16px; }

/* shared-edit(hero-rotate): stacked slides crossfade; the box keeps the tallest slide's size, so nothing jumps */
.hero-rot { position: relative; display: grid; min-width: 0; }
.hero-rot > .hero-photo { grid-area: 1 / 1; transition: opacity .6s ease, visibility .6s; }
.hero-rot > .hero-photo:not([data-on]) { opacity: 0; visibility: hidden; }
.hero-ctl { position: absolute; top: var(--s3); right: var(--s3); display: flex; align-items: center; gap: 6px;
            padding: 4px 8px; border-radius: 999px; background: rgba(0, 0, 0, .45); }
.hero-ctl[hidden] { display: none; }
.hero-dot { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .55); cursor: pointer; }
.hero-dot[aria-current="true"] { background: #fff; }
.hero-dot::after { content: ""; position: absolute; inset: -8px; } /* bigger tap target */
.hero-dot { position: relative; }
.hero-pause { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; border: 0; background: none; color: #fff; cursor: pointer; }
.hero-pause .i-play, .hero-pause[aria-pressed="true"] .i-pause { display: none; }
.hero-pause[aria-pressed="true"] .i-play { display: block; }
.hero-dot:focus-visible, .hero-pause:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .hero-rot > .hero-photo { transition: none; } }

/* ===== sections ===== */
.landing .home-sec .strip-h { margin-top: var(--s10); }
.landing .home-sec:first-of-type .strip-h { margin-top: var(--s8); }
.landing .reviews-strip .strip-h { margin-top: var(--s10); }
.home-empty { margin-top: var(--s8); }

/* category tiles: real cover photo, name, count */
.cat-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); }
.cat-tile { display: flex; align-items: center; gap: var(--s3); min-height: var(--tap); padding: var(--s2); padding-right: var(--s4); background: var(--surface);
            border: 1px solid var(--line); border-radius: var(--r-panel); color: var(--ink); text-decoration: none; height: 100%; }
.cat-tile:hover { border-color: var(--brand); }
.cat-tile:hover .cat-t { text-decoration: underline; }
.cat-tile img, .cat-ph { width: calc(var(--s14) + var(--s4)); height: var(--s14); flex: none; object-fit: cover; border-radius: var(--r-thumb); background: var(--surface-2); }
.cat-ph { display: grid; place-items: center; color: var(--muted); }
.cat-t { font-weight: 600; font-size: var(--t-small); line-height: 1.3; min-width: 0; }
.cat-n { margin-left: auto; padding-left: var(--s2); color: var(--muted); font-size: var(--t-small); }

/* how buying works */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s5); }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); padding: var(--s6); display: flex; flex-direction: column; }
.step-ico { display: grid; place-items: center; width: var(--tap); height: var(--tap); border-radius: var(--r-pill); background: var(--brand-tint); color: var(--brand); margin-bottom: var(--s3); }
.step-ico .ico { width: 20px; height: 20px; }
.step h3 { font-family: var(--font-head); font-size: calc(var(--t-h3) + 3px); font-weight: 700; margin: 0 0 var(--s2); }
.step-n { color: var(--muted); font-family: var(--font-text); font-weight: 600; margin-right: 2px; }
.step-n::after { content: "."; }
.step p { color: var(--ink-2); font-size: 15px; }
.step .step-links { margin-top: auto; padding-top: var(--s3); font-size: 15px; font-weight: 600; }
.step .step-links a { display: inline-flex; align-items: center; min-height: var(--tap); }
.step .step-links span[aria-hidden] { color: var(--muted); margin: 0 6px; }

/* recently sold: one row of four */
.cards.home-sold { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* about */
.about-body { max-width: 70ch; color: var(--ink-2); }
.about-body p { white-space: pre-line; }

/* wanted / sell or trade / farm stand */
.home-asks { margin-top: var(--s10); }
.home-asks.with-stand { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stand-card { background: var(--surface-warm); }

/* ===== responsive ===== */
@media (max-width: 1100px) {
  .hero { gap: var(--s8); }
  .cat-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: var(--s6); padding-top: var(--s8); }
  .hero-lead { max-width: none; }
  .cat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards.home-sold { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-asks.with-stand { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hero { padding-top: var(--s6); gap: var(--s5); }
  .hero h1 { font-size: calc(var(--t-h1) * 1.33); }
  .hero-lead { font-size: calc(var(--t-body) + 1px); margin-top: var(--s3); }
  .hero-ctas { margin-top: var(--s5); }
  .hero-ctas .btn { width: 100%; }
  .hero-photo figcaption { position: static; max-width: none; margin-top: var(--s2); }
  .hero-photo figcaption a { box-shadow: none; border: 1px solid var(--line); padding: var(--s2) var(--s3); }
  .cards.arrivals { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5) var(--s3); }
  .cards.arrivals .card .title { font-size: var(--t-small); }
  .cards.arrivals .card .meta { font-size: var(--t-meta); }
  .cards.arrivals .card .pr b { font-size: var(--t-body); }
  .cat-tiles { gap: var(--s2); }
  .cat-tile { display: grid; grid-template-columns: var(--s10) minmax(0, 1fr); grid-template-rows: auto auto; column-gap: var(--s2); align-content: center;
              padding: 6px var(--s2); }
  .cat-tile img, .cat-ph { grid-row: 1 / 3; width: var(--s10); height: var(--s10); }
  .cat-t { font-size: var(--t-meta); align-self: end; }
  .cat-n { margin-left: 0; padding-left: 0; font-size: var(--t-meta); align-self: start; }
  .step { padding: var(--s5); }
  .landing .home-sec .strip-h, .landing .reviews-strip .strip-h { margin-top: var(--s8); padding-top: var(--s6); }
}
