/* ============================================================
   PAPA CRAW — Production additions (loads after site.css)
   - Helper classes that replace repeated inline styles
   - CJK readability tuning for the 中文 site
   - New blocks: skip-link, WeChat card, accessibility focus
   ============================================================ */

/* ---- accessibility ---- */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 0 0 10px 0;
  font-weight: 700; font-size: 14px; }
.skip-link:focus { left: 0; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, .bill-strip:focus-visible {
  outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }

/* ---- inline-style replacements (Home) ---- */
.benefit-list { margin: 14px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.benefit-list li { display: flex; gap: 9px; font-size: 15px; color: var(--fg); }
.ck-cyan { color: var(--cyan-deep); display: inline-flex; flex: 0 0 auto; }

/* Founder quote (responsive; looser leading for CJK) */
.founder-quote { font-family: var(--font-display); font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.18; letter-spacing: -.01em; color: var(--on-dark); }
html[lang="zh-CN"] .founder-quote { font-size: clamp(24px, 3.2vw, 36px); line-height: 1.45; letter-spacing: 0; }

/* ---- Story ---- */
.story-prose { display: flex; flex-direction: column; gap: 28px; font-size: 19px; line-height: 1.7; color: var(--fg); }
html[lang="zh-CN"] .story-prose { line-height: 1.85; }
.why-big { font-family: var(--font-display); font-size: 28px; line-height: 1.25; margin-top: 18px; color: #fff; }
html[lang="zh-CN"] .why-big { font-size: 26px; line-height: 1.5; }
.cy { color: var(--cyan); }
.cy-bold { color: var(--cyan); font-weight: 700; }
.fg { color: var(--fg); }
.em-cyan { color: var(--cyan); }

/* ---- Farm ---- */
.num-steps { margin: 26px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.num-steps li { display: flex; gap: 13px; align-items: center; font-size: 16.5px; font-weight: 600; }
.num-dot { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: var(--red);
  color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 14px; }
.road-card { background: transparent; border: 2px solid var(--ink-line); border-radius: var(--r-xl); padding: 30px; }
.road-card.on { background: var(--ink-2); border-color: var(--cyan); }
.tag-status { background: rgba(255,255,255,.1); color: var(--on-dark-mut); }
.tag-status.on { background: var(--cyan); color: #04222b; }

/* ---- Wholesale ---- */
.capacity-banner { background: var(--ink); border-radius: var(--r-xl); padding: 26px 34px;
  display: flex; align-items: center; gap: 16px; color: #fff; margin-bottom: 40px; flex-wrap: wrap; }

/* ---- FAQ receiving cards ---- */
.recv-card { background: var(--ink-2); border: 1px solid var(--ink-line); border-radius: var(--r-xl); padding: 28px; }
.recv-num { font-family: var(--font-display); font-size: 15px; width: 40px; height: 40px; border-radius: 50%;
  background: var(--cyan); color: #04222b; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }

/* ---- Contact ---- */
.contact-ic { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px; background: rgba(0,184,226,.14);
  color: #aee9f7; display: flex; align-items: center; justify-content: center; }
.contact-label { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-mut); font-weight: 700; }
html[lang="zh-CN"] .contact-label { letter-spacing: .06em; text-transform: none; }
.contact-val { font-size: 16px; font-weight: 600; color: #fff; margin-top: 3px; }
.contact-val a { color: #fff; }
.contact-val a:hover { text-decoration: underline; }

/* ---- WeChat card (中文 contact) ---- */
.wechat-row { display: flex; gap: 16px; align-items: center; margin-top: 16px; }
.wechat-qr { width: 120px; height: 120px; border-radius: 12px; background: #fff; object-fit: contain;
  flex: 0 0 auto; padding: 6px; }

/* ---- Form success state (built by client.js) ---- */
.form-success { text-align: center; padding: 20px 8px; }
.form-success .ic { width: 64px; height: 64px; border-radius: 50%; background: var(--red);
  color: #fff; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; box-shadow: var(--sh-red); }
.form-note { margin-top: 18px; font-size: 12.5px; color: var(--fg-muted); }

/* ---- No-JS fallback: keep all FAQ answers visible for readers & crawlers ---- */
.no-js .acc-a { max-height: none !important; }
.no-js .to-top, .no-js .hamburger { display: none; }

/* ---- Wholesale & Dealer combined page (two-path chooser cards) ---- */
.path-split { gap: 26px; align-items: stretch; }
.path-card { display: flex; flex-direction: column; padding: 38px; }
.path-tag { font-size: 12.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--cyan-deep); }
.lang-zh .path-tag { letter-spacing: .04em; text-transform: none; }
.path-min { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin-top: 16px;
  padding: 8px 14px; border-radius: var(--r-pill); background: var(--red-tint); color: var(--red-deep);
  font-weight: 800; font-size: 14px; }
.path-min svg { flex: 0 0 auto; }
.path-cta { margin-top: auto; padding-top: 24px; }

/* ---- CJK line-wrapping: balance heading lines (kill the orphan tail like "而生。"),
   and tidy paragraph wrapping so leads don't strand a single character. ---- */
.lang-zh .h1, .lang-zh .h2, .lang-zh .h3,
.lang-zh .cta-banner h2, .lang-zh .founder-quote, .lang-zh .why-big { text-wrap: balance; }
.lang-zh .lead, .lang-zh .story-prose p, .lang-zh .card p, .lang-zh .acc-a-inner { text-wrap: pretty; }

/* ---- Story gallery: enlargeable thumbnails; full image on mobile ---- */
.story-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
.gallery-item { display: block; width: 100%; padding: 0; border: none; background: var(--ink);
  border-radius: var(--r-md); overflow: hidden; cursor: zoom-in; box-shadow: var(--sh-sm); }
.gallery-item picture { display: block; }
.gallery-item img { display: block; width: 100%; height: 110px; object-fit: cover; transition: transform .3s var(--ease); }
.gallery-item:hover img { transform: scale(1.05); }
@media (max-width: 620px) {
  .story-gallery { grid-template-columns: 1fr; gap: 14px; }
  .gallery-item img { height: auto; }          /* show the whole image, not a cropped thumbnail */
  .gallery-item:hover img { transform: none; }
}

/* ---- Image lightbox (full-size view) ---- */
.lightbox { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center;
  background: rgba(8,16,26,.92); padding: 24px; cursor: zoom-out; animation: fade .2s var(--ease); }
.lightbox.open { display: flex; }
.lightbox img { max-width: 96vw; max-height: 92vh; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.55); cursor: default; }
.lightbox-close { position: absolute; top: 14px; right: 18px; width: 46px; height: 46px; border: none;
  border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 26px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lightbox-close:hover { background: rgba(255,255,255,.26); }
