/* REVO JURIS website kit — shared data + UI primitives
   Every content string is { en, zh }. A language context picks ONE. */

/* ---------- Language context ---------- */
const LangCtx = React.createContext('EN');
function useLang() { return React.useContext(LangCtx); }
/* tx({en,zh}) -> string for the active language */
function useTx() {
  const lang = useLang();
  return (o) => (o && typeof o === 'object' && ('en' in o || 'zh' in o)) ? (lang === 'ZH' ? o.zh : o.en) : o;
}

/* ---------- Lucide icon wrapper (React-safe) ---------- */
function Icon({ name, size = 18, strokeWidth, className = '', style }) {
  const ref = React.useRef(null);
  React.useEffect(() => {
    const h = ref.current;
    if (!h || !window.lucide) return;
    h.innerHTML = `<i data-lucide="${name}"></i>`;
    window.lucide.createIcons();
    const svg = h.querySelector('svg');
    if (svg && strokeWidth) svg.setAttribute('stroke-width', strokeWidth);
  }, [name, strokeWidth]);
  return <span ref={ref} className={'lic ' + className} style={{ fontSize: size, ...style }} />;
}

function Eyebrow({ children, light }) {
  return <span className={'eyebrow' + (light ? ' light' : '')}><span className="ln" />{children}</span>;
}

/* ---------- Interface strings ---------- */
const UI = {
  utility:  { en: 'Trusted Hong Kong Legal Referral Network', zh: '可信賴的香港法律轉介網絡' },
  hotShort: { en: '24h Criminal', zh: '24小時刑事' },
  langs:    { en: 'English · Cantonese · Mandarin', zh: '中文 · 英文 · 普通話' },
  findSolicitor: { en: 'Contact Now', zh: '立即聯絡' },
  fees:     { en: 'Fees', zh: '收費' },
  feesCta:  { en: 'View Fees', zh: '查詢收費' },
  learnFees:{ en: 'Fees', zh: '收費' },
  hotline:  { en: 'Criminal Hotline', zh: '刑事熱線' },
  hotline24:{ en: 'Call 24h Hotline', zh: '致電24小時熱線' },
  requestLetter: { en: 'Contact a Solicitor Now', zh: '立即聯絡律師' },
  contactSolicitor: { en: 'Contact a Solicitor Now', zh: '立即聯絡律師' },
  urgent:   { en: 'Urgent', zh: '緊急' },
  menu:     { en: 'Menu', zh: '選單' },
  enquireNow: { en: 'Contact Now', zh: '立即聯絡' },
};

const NAV_LINKS = [
  [{ en: 'Home', zh: '首頁' }, 'index.html'],
  [{ en: 'Practice Areas', zh: '服務範疇' }, 'practice.html'],
  [{ en: 'Fees', zh: '收費' }, 'fees.html'],
  [{ en: 'Success Stories', zh: '成功案例' }, 'cases.html'],
  [{ en: 'About', zh: '關於我們' }, 'about.html'],
  [{ en: 'Contact', zh: '聯絡我們' }, 'contact.html'],
];

/* ---------- Cross-page navigation helpers ---------- */
function rjCurrentPage() {
  if (typeof window !== 'undefined' && window.__RJ_STANDALONE) return 'index.html';
  const p = location.pathname.split('/').pop();
  return (!p || p === '') ? 'index.html' : p;
}
/* On the current page, turn 'page.html#x' into a same-page '#x' anchor
   (smooth scroll); on other pages keep the full URL. */
function rjResolveHref(href) {
  if (href.startsWith('#')) return href;
  const [page, hash] = href.split('#');
  /* Standalone single-file export: map the other pages' nav links to the
     matching homepage sections so in-page scrolling still works offline. */
  if (typeof window !== 'undefined' && window.__RJ_STANDALONE) {
    const map = { 'index.html': '#top', 'practice.html': '#practice', 'fees.html': '#fees', 'contact.html': '#contact', 'cases.html': '#gallery', 'about.html': '#intro' };
    if (map[page]) return hash ? '#' + hash : map[page];
  }
  if (page === rjCurrentPage()) return hash ? '#' + hash : '#top';
  return href;
}
/* Resolve a code-referenced asset path to its bundled blob URL when this is a
   standalone export (window.__resources is set by the inliner); else passthrough. */
function rjAsset(path) {
  if (typeof window !== 'undefined' && window.__resources && window.__resources[path]) return window.__resources[path];
  return path;
}
/* Navigate to the enquiry form, remembering the chosen matter type.
   The homepage has its own inline form; everywhere else routes to contact.html. */
function rjEnquire(matter) {
  try { if (matter) localStorage.setItem('revojuris_matter', matter); } catch (e) {}
  const target = rjCurrentPage() === 'index.html' ? '#contact' : 'contact.html#contact';
  location.href = target;
}

/* ---------- Floating WhatsApp button (all pages) ---------- */
const WA_NUMBER = '85257155628';
/* Open a WhatsApp chat to the firm; used by every "contact a solicitor" CTA. */
function rjWA(matter) {
  const msg = encodeURIComponent('您好 Hello，我想查詢法律轉介服務。I would like to enquire about a legal referral.' + (matter ? ' [' + matter + ']' : ''));
  if (typeof window !== 'undefined') window.open('https://wa.me/' + WA_NUMBER + '?text=' + msg, '_blank', 'noopener');
}
const WA_GLYPH = "M16.04 4C9.96 4 5 8.96 5 15.04c0 2.12.6 4.1 1.64 5.78L5 27l6.36-1.62a11 11 0 0 0 4.68 1.04h.01c6.08 0 11.04-4.96 11.04-11.04 0-2.95-1.15-5.72-3.23-7.8A10.97 10.97 0 0 0 16.04 4zm0 19.9h-.01a9.1 9.1 0 0 1-4.65-1.27l-.33-.2-3.45.88.92-3.36-.22-.35a9.08 9.08 0 0 1-1.4-4.86c0-5.03 4.1-9.13 9.14-9.13 2.44 0 4.73.95 6.46 2.68a9.07 9.07 0 0 1 2.67 6.46c0 5.04-4.1 9.14-9.13 9.14zm5.01-6.84c-.27-.14-1.62-.8-1.87-.89-.25-.09-.43-.14-.62.14-.18.27-.71.89-.87 1.07-.16.18-.32.2-.59.07-.27-.14-1.16-.43-2.2-1.36-.82-.73-1.36-1.63-1.52-1.9-.16-.27-.02-.42.12-.55.12-.12.27-.32.4-.48.14-.16.18-.27.27-.46.09-.18.05-.34-.02-.48-.07-.14-.62-1.49-.85-2.04-.22-.53-.45-.46-.62-.47l-.53-.01c-.18 0-.48.07-.73.34-.25.27-.96.94-.96 2.29 0 1.35.98 2.66 1.12 2.84.14.18 1.93 2.95 4.68 4.14.65.28 1.16.45 1.56.58.65.21 1.25.18 1.72.11.52-.08 1.62-.66 1.85-1.3.23-.64.23-1.18.16-1.3-.07-.12-.25-.18-.52-.32z";
function FloatingWhatsApp() {
  const lang = useLang();
  const cjk = lang === 'ZH' ? ' cjk' : '';
  const label = lang === 'ZH' ? 'WhatsApp 查詢' : 'Chat on WhatsApp';
  const msg = encodeURIComponent(lang === 'ZH' ? '您好，我想查詢法律轉介服務。' : "Hello REVO JURIS, I would like a legal referral.");
  return (
    <a className="wa-fab" href={'https://wa.me/' + WA_NUMBER + '?text=' + msg} target="_blank" rel="noopener noreferrer" aria-label={label}>
      <span className={'wa-tip' + cjk}>{label}</span>
      <svg viewBox="0 0 32 32" fill="currentColor" aria-hidden="true"><path d={WA_GLYPH} /></svg>
    </a>
  );
}

/* ---------- Hero ---------- */
const HERO = {
  eyebrow: { en: 'Trusted legal referrals', zh: '可信賴的法律轉介' },
  h1: { en: ['Trusted Legal Referrals', 'for Hong Kong Residents'], zh: ['香港居民', '首選法律轉介平台'] },
  lede: {
    en: 'Whether you face criminal charges, need a civil demand letter, or are navigating inheritance — REVO JURIS connects you with the right solicitor within 24 hours, at transparent fixed fees.',
    zh: '無論您面臨刑事指控、需要民事律師信，或正處理遺產繼承，億誠均可於24小時內為您配對合適的香港執業律師，收費透明清晰。',
  },
  trust: [
    { icon: 'shield-check', t: { en: 'Vetted Solicitors', zh: '嚴選執業律師' } },
    { icon: 'clock', t: { en: '24h Response', zh: '24小時回應' } },
    { icon: 'badge-check', t: { en: 'Fixed Fees', zh: '固定收費' } },
    { icon: 'globe', t: { en: 'English · Cantonese · Mandarin', zh: '中 · 英 · 普通話' } },
  ],
};

const STATS = [
  [{ en: '1,800+', zh: '1,800+' }, { en: 'Cases Referred', zh: '成功轉介' }],
  [{ en: '95%', zh: '95%' }, { en: 'Satisfaction', zh: '客戶滿意率' }],
  [{ en: '48', zh: '48' }, { en: 'Panel Solicitors', zh: '網絡律師' }],
  [{ en: '24h', zh: '24小時' }, { en: 'First Response', zh: '首次回應' }],
  [{ en: '3', zh: '3' }, { en: 'Practice Areas', zh: '服務範疇' }],
];

/* ---------- Practice areas ---------- */
const PRACTICE_HEAD = {
  eyebrow: { en: 'Our practice areas', zh: '我們的服務範疇' },
  h2: { en: 'Three core areas of law', zh: '三大核心法律服務' },
};
const PRACTICE_AREAS = [
  {
    id: 'criminal', icon: 'scale', urgent: true, image: 'assets/photos/svc-criminal.png',
    title: { en: 'Criminal Defence', zh: '刑事辯護' },
    desc: { en: "Arrest to appeal — robust defence at every stage of Hong Kong's criminal justice process. Available 24/7.", zh: '由被捕至上訴 — 在香港刑事司法程序的每一階段提供全面辯護，24小時候命。' },
    items: [
      { en: 'Bail Applications & Hearings', zh: '保釋申請及聆訊' },
      { en: "Magistrates' Court Defence (300+ offences)", zh: '裁判法院辯護（300+種罪行）' },
      { en: 'District & High Court Trials', zh: '區域及高等法院審訊' },
      { en: 'Drug, Theft, Fraud & White Collar', zh: '毒品、盜竊、欺詐及白領罪行' },
      { en: 'Mitigation & Sentencing Advocacy', zh: '求情陳詞及判刑辯護' },
      { en: 'Legal Aid (Duty Lawyer Scheme)', zh: '當值律師計劃申請' },
    ],
    cta: { en: 'Urgent', zh: '緊急' },
  },
  {
    id: 'civil', icon: 'file-text', urgent: false, image: 'assets/photos/svc-civil.png',
    title: { en: 'Civil Letters & Actions', zh: '民事律師信及訴訟' },
    desc: { en: 'Demand letters to full High Court litigation — debt, contracts, defamation, employment and more.', zh: '由律師信至高等法院訴訟 — 追債、合約、誹謗、勞資等糾紛。' },
    items: [
      { en: 'Demand Letters (Debt / Contract / Tort)', zh: '律師信（追債／合約／侵權）' },
      { en: 'Small Claims Tribunal (to HK$75,000)', zh: '小額錢債審裁處（上限75,000港元）' },
      { en: 'District Court Actions (to HK$3M)', zh: '區域法院訴訟（上限300萬港元）' },
      { en: 'High Court & Injunctions', zh: '高等法院訴訟及禁制令' },
      { en: 'Employment & Unfair Dismissal', zh: '勞資索償及非法解僱' },
      { en: 'Defamation & Online Harassment', zh: '誹謗及網絡滋擾' },
    ],
    cta: { en: 'Get started', zh: '立即諮詢' },
  },
  {
    id: 'inheritance', icon: 'landmark', urgent: false, image: 'assets/photos/svc-inheritance-v2.png',
    title: { en: 'Wills & Inheritance', zh: '遺囑及遺產繼承' },
    desc: { en: 'Probate, letters of administration, cross-border (Mainland + HK) estate and contentious probate.', zh: '遺產認證、遺產管理書、跨境（內地及香港）遺產及遺產爭議訴訟。' },
    items: [
      { en: 'Will Drafting, Witnessing & Storage', zh: '遺囑草擬、見證及存放' },
      { en: 'Grant of Probate (with valid will)', zh: '遺產認證書申請（有效遺囑）' },
      { en: 'Letters of Administration (intestate)', zh: '遺產管理書申請（無遺囑）' },
      { en: 'Cross-Border Estate (HK + Mainland)', zh: '跨境遺產（香港＋內地）' },
      { en: 'Will Disputes & Contested Probate', zh: '遺囑爭議及遺產訴訟' },
      { en: 'Estate Asset Recovery & Distribution', zh: '遺產資產追討及分配' },
    ],
    cta: { en: 'Enquire', zh: '立即查詢' },
  },
];

/* ---------- Rights ---------- */
const RIGHTS_HEAD = {
  eyebrow: { en: 'Know your rights', zh: '認識您的權利' },
  h2: { en: 'Your legal rights upon arrest in Hong Kong', zh: '在香港被捕時的法定權利' },
  sub: { en: 'Exercise them immediately', zh: '請即時行使您的權利' },
};
const RIGHTS = [
  ['01', { en: 'Right to Remain Silent', zh: '保持緘默權' }, { en: 'You have the right to remain silent. Anything you say may be used as evidence in court.', zh: '您有權保持緘默，任何陳述均可能在法庭作為呈堂証供。' }],
  ['02', { en: 'Right to a Solicitor', zh: '聘用律師權' }, { en: 'You may contact a solicitor immediately upon arrest. Police must not question you before that.', zh: '您有權在被捕後即時聯絡律師，警方不得在此前審訊您。' }],
  ['03', { en: 'Right to Know the Charge', zh: '知悉控罪權' }, { en: 'Police must inform you of the reason for arrest in a language you understand.', zh: '警方必須以您能理解的語言告知您被捕原因及罪名。' }],
  ['04', { en: 'Right to Apply for Bail', zh: '申請保釋權' }, { en: 'In most cases you may apply for bail; a solicitor can make the strongest case for you.', zh: '在大多數情況下您有權申請保釋，律師可協助提出最有力的陳詞。' }],
  ['05', { en: 'Right to Notify Someone', zh: '通知他人權' }, { en: 'You have the right to notify a relative, friend, or solicitor of your detention.', zh: '您有權通知一名親友或律師您被拘留的地點。' }],
  ['06', { en: 'Duty Lawyer Scheme', zh: '當值律師計劃' }, { en: 'If you cannot afford a solicitor, the Duty Lawyer Scheme covers 300+ offences in the Magistrates\u2019 Court.', zh: '若無力負擔律師費，可申請當值律師計劃，涵蓋裁判法院300+種罪行。' }],
];
const RIGHTS_NOTE = {
  en: 'Call us immediately upon arrest. Our 24h hotline connects you to a solicitor who can attend the police station, advise on caution statements, and apply for bail. Do NOT make any statement before speaking to a solicitor.',
  zh: '被捕後請即時致電我們的24小時熱線，律師可立即到警署提供意見、處理警誡陳述並申請保釋。未見律師前，請勿向警方作出任何陳述。',
};

/* ---------- Civil letters ---------- */
const CIVIL_HEAD = {
  eyebrow: { en: 'Civil letter guide', zh: '民事律師信指引' },
  h2: { en: 'Civil letters — select your type', zh: '民事律師信 — 選擇您所需類別' },
  sub: { en: 'Fixed-fee options available', zh: '可選固定收費' },
};
const CIVIL_TYPES = [
  {
    id: 'debt', icon: 'banknote', label: { en: 'Debt', zh: '追債' },
    title: { en: 'Debt Recovery Demand Letter', zh: '追討欠款律師信' },
    bestFor: { en: 'Unpaid loans, trade debts, bounced cheques, rental arrears', zh: '個人／商業欠款、空頭支票、租金拖欠' },
    fee: { en: 'From HK$1,800–$3,500', zh: '由 HK$1,800–$3,500 起' },
    turn: { en: 'Draft ready within 2 business days', zh: '2個工作天內完稿' },
    ignored: { en: 'Escalate to Small Claims Tribunal or District Court', zh: '可進一步提交審裁處或區域法院' },
    quote: { en: 'A solicitor\u2019s demand letter is highly effective — the majority of debt cases settle after formal legal correspondence, without court proceedings.', zh: '律師信在香港具重要法律效力，大多數欠債人收到後主動和解，毋須訴訟。' },
  },
  {
    id: 'contract', icon: 'file-signature', label: { en: 'Contract', zh: '合約' },
    title: { en: 'Contract & Breach Demand Letter', zh: '合約糾紛律師信' },
    bestFor: { en: 'Breach of agreement, non-delivery, service disputes', zh: '違約、未能交付、服務糾紛' },
    fee: { en: 'From HK$2,200–$4,000', zh: '由 HK$2,200–$4,000 起' },
    turn: { en: 'Draft ready within 2–3 business days', zh: '2至3個工作天內完稿' },
    ignored: { en: 'Proceed to District or High Court litigation', zh: '可提起區域或高等法院訴訟' },
    quote: { en: 'A clearly drafted letter setting out the breach and remedy sought often prompts settlement and preserves your position for any later claim.', zh: '清楚列明違約事實及補救要求的律師信，往往能促成和解，並保留日後索償的權利。' },
  },
  {
    id: 'property', icon: 'home', label: { en: 'Property', zh: '物業' },
    title: { en: 'Property & Tenancy Demand Letter', zh: '物業及租務律師信' },
    bestFor: { en: 'Rental arrears, deposit disputes, repairs, vacant possession', zh: '租金拖欠、按金爭議、維修、收回物業' },
    fee: { en: 'From HK$2,000–$3,800', zh: '由 HK$2,000–$3,800 起' },
    turn: { en: 'Draft ready within 2 business days', zh: '2個工作天內完稿' },
    ignored: { en: 'Lands Tribunal or possession proceedings', zh: '可向土地審裁處申請或提起收樓程序' },
    quote: { en: 'For tenancy matters, a formal letter clarifies obligations under the lease and is essential evidence before any Lands Tribunal application.', zh: '租務糾紛中，律師信能釐清租約責任，並為土地審裁處申請提供重要証據。' },
  },
  {
    id: 'defamation', icon: 'megaphone', label: { en: 'Defamation', zh: '誹謗' },
    title: { en: 'Defamation & Harassment Letter', zh: '誹謗及網絡滋擾律師信' },
    bestFor: { en: 'False statements, online harassment, reputation harm', zh: '不實言論、網絡滋擾、損害名譽' },
    fee: { en: 'From HK$3,000–$6,000', zh: '由 HK$3,000–$6,000 起' },
    turn: { en: 'Draft ready within 2–3 business days', zh: '2至3個工作天內完稿' },
    ignored: { en: 'Injunction and/or defamation proceedings', zh: '可申請禁制令及／或提起誹謗訴訟' },
    quote: { en: 'A cease-and-desist letter demands removal of defamatory content and retraction — frequently resolving the matter before court action.', zh: '律師信要求移除誹謗內容及作出更正，往往能在訴訟前解決事件。' },
  },
  {
    id: 'employment', icon: 'briefcase', label: { en: 'Employment', zh: '勞資' },
    title: { en: 'Employment & Wages Demand Letter', zh: '勞資索償律師信' },
    bestFor: { en: 'Unpaid wages, wrongful dismissal, unpaid entitlements', zh: '欠薪、不合理解僱、未付權益' },
    fee: { en: 'From HK$1,800–$3,500', zh: '由 HK$1,800–$3,500 起' },
    turn: { en: 'Draft ready within 2 business days', zh: '2個工作天內完稿' },
    ignored: { en: 'Labour Tribunal claim', zh: '可向勞資審裁處提出申索' },
    quote: { en: 'Many wage and entitlement disputes settle once an employer receives a formal letter — before any Labour Tribunal hearing is needed.', zh: '不少欠薪及權益糾紛在僱主收到律師信後即達成和解，毋須勞資審裁處聆訊。' },
  },
];
const CIVIL_LABELS = {
  bestFor: { en: 'Best for', zh: '適用情況' },
  fee: { en: 'Typical fee', zh: '收費' },
  turn: { en: 'Turnaround', zh: '完稿時間' },
  ignored: { en: 'If ignored', zh: '若被無視' },
};

/* ---------- Fees ---------- */
const FEE_HEAD = {
  eyebrow: { en: 'Transparent fees', zh: '透明收費' },
  h2: { en: 'Transparent fee guide', zh: '收費參考指引' },
  sub: { en: 'Fixed fees, clearly stated', zh: '固定收費，清晰透明' },
};
const FEES = [
  { tag: { en: 'Civil', zh: '民事' }, title: { en: 'Demand Letter', zh: '律師信' }, price: 'HK$1,800', from: { en: 'from', zh: '起' }, note: { en: 'Fixed-fee option', zh: '固定收費' },
    items: [{ en: 'Single demand letter (standard)', zh: '單封標準律師信' }, { en: 'Draft in 2 business days', zh: '2個工作天內完稿' }, { en: 'Follow-up advice included', zh: '包含後續法律意見' }, { en: 'Bilingual EN / 中文 available', zh: '可選中／英文版本' }], cta: { en: 'Get a Letter', zh: '索取律師信' }, feat: false },
  { tag: { en: 'Criminal', zh: '刑事' }, title: { en: 'Criminal Defence', zh: '刑事辯護' }, price: 'HK$8,000', from: { en: 'from', zh: '起' }, note: { en: "Magistrate\u2019s Court", zh: '裁判法院' },
    items: [{ en: 'Consultation + police station', zh: '法律諮詢及警署陪同' }, { en: 'Bail application representation', zh: '保釋申請代表' }, { en: 'Fixed-scale fees agreed upfront', zh: '預先議定固定收費' }, { en: 'Legal Aid assistance if eligible', zh: '協助申請法律援助' }], cta: { en: 'Urgent Call', zh: '緊急致電' }, feat: true },
  { tag: { en: 'Inheritance', zh: '遺產' }, title: { en: 'Probate / Wills', zh: '遺產認證／遺囑' }, price: 'HK$5,500', from: { en: 'from', zh: '起' }, note: { en: 'Simple uncontested', zh: '簡單非爭議' },
    items: [{ en: 'Will drafting from HK$2,500', zh: '遺囑草擬 HK$2,500 起' }, { en: 'Probate application (simple)', zh: '遺產認證申請（簡單）' }, { en: 'Letters of Administration', zh: '遺產管理書申請' }, { en: 'Cross-border quoted separately', zh: '跨境個案另行報價' }], cta: { en: 'Enquire', zh: '立即查詢' }, feat: false },
  { tag: { en: 'All areas', zh: '所有範疇' }, title: { en: 'Initial Consultation', zh: '初步法律諮詢' }, price: 'HK$500', from: { en: '30 min', zh: '30分鐘' }, note: { en: 'Credited toward instruction', zh: '可抵扣委託費用' },
    items: [{ en: 'Video or in-person session', zh: '視像或親身會面' }, { en: 'Written advice summary', zh: '書面意見摘要' }, { en: 'Full fee credited if you proceed', zh: '委託後全數抵扣' }, { en: 'English · Cantonese · Mandarin', zh: '中 · 英 · 普通話' }], cta: { en: 'Book', zh: '預約' }, feat: false },
];
const FEE_DISCLAIMER = { en: 'Indicative ranges only. Final fees are confirmed in writing by the instructed solicitor before any work begins.', zh: '以上為參考範圍，正式收費由受委託律師於工作開始前以書面確認。' };

/* ---------- FAQ ---------- */
const FAQ_HEAD = { eyebrow: { en: 'Common questions', zh: '常見問題' }, h2: { en: 'Frequently asked questions', zh: '常見問題解答' } };
const FAQS = [
  { q: { en: 'Should I answer police questions before seeing a solicitor?', zh: '被捕後未見律師前，我應否回答警方問題？' },
    a: { en: '<b>No.</b> You have an absolute right to remain silent. State clearly: "I wish to remain silent and want to speak to a solicitor." Anything you say — including informal conversation — can be used as evidence in court.', zh: '<b>不應。</b>被捕後您有絕對的緘默權。應清楚表明：「我希望保持緘默，並要求會見律師。」任何陳述（包括非正式對話）均可作為呈堂証供。' } },
  { q: { en: 'How effective is a civil demand letter in Hong Kong?', zh: '香港的民事律師信有多大效力？' },
    a: { en: 'Highly effective. A formal solicitor\u2019s letter demonstrates legal representation and creates a documented record. The majority of debt cases settle after a demand letter without court proceedings. If ignored, it is essential evidence for any court action.', zh: '效力顯著。正式律師信顯示您已獲法律代表，並建立書面記錄。大多數欠款個案在收到律師信後即達成和解，毋須訴訟。若對方無視，律師信亦是日後訴訟的重要証據。' } },
  { q: { en: 'What happens if someone dies without a will in Hong Kong?', zh: '若在香港無立遺囑而身故，會如何處理？' },
    a: { en: 'The <b>Intestates\u2019 Estates Ordinance (Cap. 73)</b> applies. The estate is distributed per a fixed legal order: spouse and children first, then parents, siblings, and more distant relatives. Next of kin must apply for <b>Letters of Administration</b> — dealing with an estate without authority is a criminal offence.', zh: '《無遺囑者遺產條例》（第73章）適用。遺產按法定次序分配：配偶及子女優先，其次為父母、兄弟姊妹及較遠親屬。近親須申請<b>遺產管理書</b>；未獲授權擅自處理遺產屬刑事罪行。' } },
  { q: { en: 'My relative died in Mainland China but owned property in Hong Kong — what do I do?', zh: '親屬在內地去世但在香港擁有物業，應怎辦？' },
    a: { en: 'A grant must be separately obtained from the <b>HK High Court Probate Registry</b> for HK assets — a Mainland court order is NOT automatically recognised in Hong Kong. Our solicitors work with both HK and PRC-qualified lawyers to handle both jurisdictions simultaneously.', zh: '必須另行向<b>香港高等法院遺產承辦處</b>申請授權處理香港資產；內地法院命令不會在香港自動獲承認。我們的律師可與香港及內地執業律師合作，同步處理兩地手續。' } },
  { q: { en: 'Can I get Legal Aid for criminal cases in Hong Kong?', zh: '在香港的刑事案件可申請法律援助嗎？' },
    a: { en: 'Yes. The <b>Legal Aid Department</b> covers criminal cases in the District and High Courts (means test up to HK$449,620). The <b>Duty Lawyer Scheme</b> covers 300+ offences in the Magistrates\u2019 Court at no cost. Our solicitors can advise on eligibility and assist with applications.', zh: '可以。<b>法律援助署</b>為區域法院及高等法院的刑事案件提供法援（經濟審查上限449,620港元）。<b>當值律師計劃</b>在裁判法院免費提供服務，涵蓋300多種罪行。我們的律師可評估資格並協助申請。' } },
  { q: { en: 'What is the difference between a solicitor and a barrister?', zh: '律師與大律師有何分別？' },
    a: { en: '<b>Solicitors</b> are your first point of contact — they advise, draft documents, write letters, and brief barristers. <b>Barristers</b> specialise in courtroom advocacy and are engaged by solicitors. REVO JURIS connects you to a solicitor from our panel.', zh: '<b>律師</b>是客戶的第一線聯絡人，負責提供意見、草擬文件、撰寫律師信及委托大律師。<b>大律師</b>專責法庭陳詞，由律師委托。億誠為您配對網絡內的執業律師。' } },
];

/* ---------- Testimonials (separate EN / ZH clients) ---------- */
const TST_HEAD = { eyebrow: { en: 'Client outcomes', zh: '客戶評價' }, h2: { en: 'What clients say', zh: '客戶怎麼說' } };
const TESTIMONIALS = [
  { area: { en: 'Cross-border Estate', zh: '跨境遺產繼承' },
    initial: { en: 'F', zh: '家' },
    name: { en: 'Ms Lai', zh: '黎小姐' },
    meta: { en: 'Care-home estate signing', zh: '安老院舍遺產簽署' },
    quote: { en: 'The team came to the care home in person and explained everything clearly and patiently — the family felt completely reassured.', zh: '律師團隊親身到院舍辦理，解釋清晰又細心，讓家人十分放心。' } },
  { area: { en: 'Cross-border Will', zh: '跨境平安紙' },
    initial: { en: 'F', zh: '家' },
    name: { en: 'Ms Cheung', zh: '張小姐' },
    meta: { en: 'Urgent bedside will', zh: '緊急到院平安紙' },
    quote: { en: 'When help was needed most, the lawyers came to the hospital the same day — professional, and full of warmth.', zh: '在最需要幫助的時候，律師即日到院處理，專業又有溫度。' } },
  { area: { en: 'Cross-border Estate', zh: '跨境遺產繼承' },
    initial: { en: 'T', zh: '曾' },
    name: { en: 'Mr Tsang', zh: '曾先生' },
    meta: { en: 'Complex 18-month estate', zh: '歷時18個月複雜遺產' },
    quote: { en: 'A complex case we had no idea how to start was resolved in the end — the family could finally set their minds at ease.', zh: '原本毫無頭緒的複雜案件，最終獲得圓滿解決，家人終於放下心頭大石。' } },
];

/* ---------- Emergency ---------- */
const EMERGENCY = {
  h3: { en: 'Arrested or facing urgent criminal charges in Hong Kong?', zh: '在香港被捕或面臨緊急刑事指控？' },
  p: { en: '24-hour criminal legal hotline — connected instantly to a duty solicitor.', zh: '24小時刑事法律熱線，即時接通當值律師。' },
  btn: { en: 'Call 24h Hotline', zh: '致電24小時熱線' },
};

/* ---------- Contact ---------- */
const CONTACT_HEAD = {
  eyebrow: { en: 'Contact us', zh: '聯絡我們' },
  h2: { en: 'Tell us what you need', zh: '告訴我們您的需要' },
  sub: { en: 'We respond within 24 hours', zh: '我們將於24小時內回覆' },
};
const CONTACT_INFO = [
  { icon: 'map-pin', hot: false, k: { en: 'Office', zh: '辦公室' }, v: { en: 'Room 901, 9/F, Edward Wong Tower, 910 Cheung Sha Wan Road, Kowloon, Hong Kong', zh: '香港九龍長沙灣道910號 Edward Wong Tower 9樓901室' }, sub: { en: 'By appointment', zh: '須預約' } },
  { icon: 'phone', hot: false, k: { en: 'Office line', zh: '辦公室電話' }, v: '+852 5715 5628', sub: { en: 'Mon–Fri 9:00–19:00', zh: '星期一至五 9:00–19:00' } },
  { icon: 'siren', hot: true, k: { en: '24h Criminal', zh: '刑事緊急' }, v: '+852 5715 5628', sub: { en: 'Criminal hotline 24/7', zh: '全天候24小時刑事熱線' } },
  { icon: 'mail', hot: false, k: { en: 'Email', zh: '電郵' }, v: 'info@smebrother.com', sub: null },
  { icon: 'message-circle', hot: false, k: { en: 'WhatsApp', zh: 'WhatsApp' }, v: '+852 5715 5628', sub: { en: 'Video consult (Zoom / Teams)', zh: '可視像諮詢（Zoom／Teams）' } },
];
const FORM = {
  title: { en: 'Find a solicitor', zh: '尋找律師' },
  sub: { en: 'Free initial enquiry — reply within 24 hours', zh: '免費初步查詢 — 24小時內回覆' },
  matterLabel: { en: 'Matter type', zh: '事項類別' },
  matters: [['criminal', { en: 'Criminal', zh: '刑事' }], ['civil', { en: 'Civil', zh: '民事' }], ['inheritance', { en: 'Inheritance', zh: '遺產' }]],
  name: { en: 'Full name', zh: '姓名' },
  namePh: { en: 'Chan Tai Man', zh: '陳大文' },
  phone: { en: 'Phone', zh: '電話' },
  email: { en: 'Email', zh: '電郵' },
  optional: { en: '(optional)', zh: '（可選）' },
  msg: { en: 'Briefly describe your situation', zh: '簡述您的情況' },
  msgPh: { en: 'What happened, and what do you need help with?', zh: '發生了甚麼事？您需要甚麼協助？' },
  consent: { en: 'I understand REVO JURIS is a referral service, not a law firm, and consent to being contacted.', zh: '本人明白億誠為法律轉介平台而非律師行，並同意被聯絡。' },
  submit: { en: 'Submit enquiry', zh: '提交查詢' },
  okTitle: { en: 'Enquiry received', zh: '已收到您的查詢' },
  okBody: { en: 'Thank you. A member of our team will respond within 24 hours to match you with a suitable solicitor.', zh: '多謝您的查詢。我們將於24小時內回覆，並為您配對合適的律師。' },
  another: { en: 'Submit another', zh: '再次查詢' },
};

/* ---------- Footer ---------- */
const FOOTER_AREAS = [
  { en: 'Criminal Defence', zh: '刑事辯護' }, { en: 'Civil Demand Letters', zh: '民事律師信' }, { en: 'Civil Litigation', zh: '民事訴訟' },
  { en: 'Wills & Probate', zh: '遺囑及遺產認證' }, { en: 'Letters of Administration', zh: '遺產管理書' }, { en: 'Cross-Border Estate', zh: '跨境遺產' },
];
const FOOTER_CONTACT = [
  '+852 5715 5628', { en: '+852 5715 5628 (24h)', zh: '+852 5715 5628（24小時）' }, 'info@smebrother.com',
  { en: '901, 9/F, Edward Wong Tower, 910 Cheung Sha Wan Road, Kowloon, Hong Kong', zh: '香港九龍長沙灣道910號 Edward Wong Tower 9樓901室' },
];
const FOOTER = {
  desc: { en: 'A trusted referral network connecting Hong Kong residents with qualified solicitors across criminal defence, civil actions, and inheritance law.', zh: '可信賴的法律轉介平台，為香港居民配對刑事、民事及遺產法律範疇的合資格律師。' },
  areasH: { en: 'Practice Areas', zh: '服務範疇' },
  contactH: { en: 'Contact', zh: '聯絡' },
  copy: { en: '© 2025 REVO JURIS Consulting Limited', zh: '© 2025 億誠國際法律顧問有限公司' },
  disclaimer: {
    en: 'Disclaimer: REVO JURIS is a legal referral service and is not a law firm. We do not provide legal advice directly. All legal services are provided by independent, regulated solicitors on our panel. Nothing on this website constitutes legal advice.',
    zh: '免責聲明：億誠國際法律顧問為法律轉介服務平台，並非律師行，不直接提供法律意見。所有法律服務均由本平台網絡內、受規管的獨立執業律師提供。本網站任何內容均不構成法律意見。',
  },
};

/* ---------- Brand wordmark per language ---------- */
const BRAND = {
  en: { main: 'REVO JURIS', sub: 'Legal Referral · Hong Kong', mainHtml: 'REVO&nbsp;<em>JURIS</em>' },
  zh: { main: '億誠', sub: '國際法律顧問', mainHtml: '億誠<em>國際</em>' },
};

Object.assign(window, {
  LangCtx, useLang, useTx, Icon, Eyebrow, UI, NAV_LINKS, HERO, STATS,
  rjCurrentPage, rjResolveHref, rjEnquire, rjAsset, FloatingWhatsApp, WA_NUMBER, rjWA,
  PRACTICE_HEAD, PRACTICE_AREAS, RIGHTS_HEAD, RIGHTS, RIGHTS_NOTE,
  CIVIL_HEAD, CIVIL_TYPES, CIVIL_LABELS, FEE_HEAD, FEES, FEE_DISCLAIMER,
  FAQ_HEAD, FAQS, TST_HEAD, TESTIMONIALS, EMERGENCY,
  CONTACT_HEAD, CONTACT_INFO, FORM, FOOTER_AREAS, FOOTER_CONTACT, FOOTER, BRAND,
});
