/* Qidu Legal Translation — shared styles
   Tokens first; edit here to retheme the whole site. */
:root {
  --navy: #334b95;          /* TransPerfect-style base blue */
  --bright: #3d63e0;        /* brighter blue for buttons and accents */
  --sky: #eaf0fc;
  --sky-strong: #d6e2fb;
  --icon: #6c93dc;
  --ink: #1b2440;
  --slate: #55617f;
  --line: #d5def0;
  --mist: #eef3fc;
  --paper: #ffffff;
  --seal: #da251c;          /* taken from the logo */
  --seal-soft: #fbe9e8;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --cjk: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --wrap: 1120px;
  --gutter: clamp(20px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--bright); }
:focus-visible { outline: 2px solid var(--seal); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--sky-strong); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* Type */
h1, h2, h3 { font-family: var(--serif); color: var(--navy); font-weight: 500; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.7rem); line-height: 1.08; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.18; }
h3 { font-size: 1.28rem; line-height: 1.3; }
p { margin: 0 0 1em; max-width: 68ch; }
.lede { font-size: 1.16rem; color: var(--slate); max-width: 60ch; }
.small { font-size: .9rem; color: var(--slate); }
.muted { color: var(--slate); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 50; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.brand img { height: 46px; width: auto; display: block; }
.brand .name { font-family: var(--serif); font-size: 1.28rem; line-height: 1.1; font-weight: 500; }
.brand .name small { display: block; font: 400 .74rem/1.3 var(--sans); color: var(--slate); margin-top: 3px; letter-spacing: .01em; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { text-decoration: none; font-size: .95rem; color: var(--ink); padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--navy); border-bottom-color: var(--line); }
.nav a[aria-current="page"] { border-bottom-color: var(--seal); color: var(--navy); }
.nav .lang { color: var(--slate); font-size: .88rem; }
.lang-group { display: inline-flex; align-items: center; gap: 6px; }
.lang-sep { color: var(--line); font-size: .8rem; }
.btn {
  display: inline-block; background: var(--bright); color: #fff; text-decoration: none;
  padding: 12px 22px; border: 1px solid var(--bright); font: 500 .96rem/1.2 var(--sans); cursor: pointer;
  transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn.ghost:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.nav a.btn { padding: 9px 16px; font-size: .9rem; color: #fff; border: 1px solid var(--bright); }
.nav a.btn:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.nav a.btn[aria-current="page"] { border-color: var(--bright); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); padding: 8px 12px; font: inherit; font-size: .92rem; color: var(--navy); cursor: pointer; }

/* Sections */
section { padding: clamp(56px, 8vw, 96px) 0; }
.band { background: var(--mist); }
.rule-top { border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; margin-bottom: 48px; align-items: start; }
.section-head p { margin: 0; color: var(--slate); }

/* Hero */
.hero { padding: clamp(56px, 8vw, 104px) 0 clamp(48px, 7vw, 88px); background: linear-gradient(180deg, var(--sky) 0, #fff 100%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { margin-bottom: 24px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-note { margin-top: 28px; color: var(--slate); font-size: .92rem; }

/* Bilingual specimen — the one memorable element */
.specimen { border: 1px solid var(--navy); background: var(--paper); position: relative; }
.specimen::before { content: ""; position: absolute; left: -1px; top: -1px; width: 56px; height: 4px; background: var(--seal); }
.spec-row { padding: 26px 28px; }
.spec-row + .spec-row { border-top: 1px solid var(--line); }
.spec-lang { font-size: .8rem; color: var(--slate); margin-bottom: 8px; }
.spec-zh { font-family: var(--cjk); font-size: 1.32rem; line-height: 1.7; color: var(--navy); }
.spec-en { font-family: var(--serif); font-size: 1.22rem; line-height: 1.55; color: var(--ink); }
.term { border-bottom: 1px dashed var(--slate); cursor: default; transition: background .15s, border-color .15s; padding: 0 1px; }
.term.on { background: var(--sky-strong); border-bottom: 1px solid var(--bright); }
.spec-foot { background: var(--sky); border-top: 1px solid var(--line); padding: 14px 28px; font-size: .88rem; color: var(--slate); }

/* Grids */
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.cols-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px 56px; }
.item { border-top: 1px solid var(--navy); padding-top: 20px; }
.item h3 { margin-bottom: 10px; }
.item p { color: var(--slate); margin: 0; font-size: 1rem; }

/* Lists */
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.plain li:first-child { border-top: 1px solid var(--line); }
.tick li { padding-left: 22px; position: relative; }
.tick li::before { content: ""; position: absolute; left: 0; top: 1.05em; width: 10px; height: 2px; background: var(--bright); }

/* Definition rows */
.dl { display: grid; grid-template-columns: 220px 1fr; border-top: 1px solid var(--navy); }
.dl dt, .dl dd { margin: 0; padding: 18px 0; border-bottom: 1px solid var(--line); }
.dl dt { font-family: var(--serif); font-size: 1.15rem; color: var(--navy); padding-right: 24px; }
.dl dd { color: var(--ink); }
.dl dd p:last-child { margin-bottom: 0; }

/* Process steps (a real sequence, so numbered) */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--navy); }
.steps li { counter-increment: s; padding: 20px 20px 24px 0; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(s); display: block; font-family: var(--serif); font-size: 1.5rem; color: var(--bright); margin-bottom: 6px; }
.steps strong { display: block; font-family: var(--serif); font-weight: 500; font-size: 1.1rem; color: var(--navy); margin-bottom: 4px; }
.steps span { font-size: .93rem; color: var(--slate); line-height: 1.5; display: block; }

/* Client name lists */
.names { columns: 2; column-gap: 40px; margin: 0; padding: 0; list-style: none; }
.names li { break-inside: avoid; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .98rem; }
.client-block { display: grid; grid-template-columns: 240px 1fr; gap: 40px; padding: 32px 0; border-top: 1px solid var(--navy); }
.client-block h3 { padding-right: 16px; }
.client-block p.small { margin-top: 8px; }

/* Quote band */
.callout { border-left: 3px solid var(--bright); padding: 4px 0 4px 24px; max-width: 62ch; }
.callout p { font-family: var(--serif); font-size: 1.4rem; line-height: 1.4; color: var(--navy); margin: 0; }

/* CTA */
.cta { background: var(--navy); color: #fff; }
.cta h2 { color: #fff; }
.cta p { color: #d4defa; }
.cta .btn { background: #fff; color: var(--navy); border-color: #fff; }
.cta .btn:hover { background: var(--sky-strong); border-color: var(--sky-strong); color: var(--navy); }
.cta .inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.cta .inner > div:last-child { justify-self: end; }

/* Forms */
form.contact { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
label { font-size: .92rem; color: var(--navy); font-weight: 500; }
input, select, textarea {
  font: inherit; color: var(--ink); background: var(--paper); border: 1px solid #aab3c2; border-radius: 0;
  padding: 11px 12px; width: 100%;
}
textarea { min-height: 150px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--navy); outline-offset: 0; border-color: var(--navy); }
.form-note { font-size: .88rem; color: var(--slate); }
.status { font-size: .95rem; color: var(--navy); min-height: 1.4em; }

/* Footer */
.site-footer { background: var(--mist); border-top: 1px solid var(--line); padding: 56px 0 28px; font-size: .95rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.foot-grid h3 { font-family: var(--sans); font-size: .95rem; font-weight: 600; margin-bottom: 12px; color: var(--navy); letter-spacing: 0; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { padding: 3px 0; }
.foot-grid a { color: var(--ink); text-decoration: none; }
.foot-grid a:hover { color: var(--bright); text-decoration: underline; }
.foot-brand img { height: 52px; margin-bottom: 12px; }
.foot-brand p { color: var(--slate); font-size: .92rem; max-width: 34ch; }
.legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--slate); font-size: .86rem; }

/* Prose (privacy page) */
.prose h2 { font-size: 1.5rem; margin: 40px 0 12px; }
.prose ul { padding-left: 1.2em; max-width: 68ch; }
.prose li { margin-bottom: 6px; }

/* Cookie notice */
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 560px; background: var(--navy); color: #eaf0fc; padding: 16px 18px; z-index: 80; font-size: .9rem; line-height: 1.5; display: none; box-shadow: 0 6px 24px rgba(18,35,63,.25); }
.cookie.show { display: block; }
.cookie a { color: #fff; }
.cookie button { margin-top: 10px; background: #fff; color: var(--navy); border: 0; padding: 8px 16px; font: 500 .9rem var(--sans); cursor: pointer; }
.cookie button:hover { background: var(--sky-strong); color: var(--navy); }

/* Page intro (inner pages) */
.page-intro { padding: clamp(48px, 7vw, 88px) 0 clamp(32px, 5vw, 56px); border-bottom: 1px solid var(--line); }
.page-intro h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); margin-bottom: 18px; }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid, .section-head, .cta .inner, .client-block { grid-template-columns: 1fr; }
  .cta .inner > div:last-child { justify-self: start; }
  .cols-3 { grid-template-columns: 1fr; gap: 28px; }
  .cols-2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .menu-btn { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); flex-direction: column; align-items: flex-start; gap: 0; padding: 8px var(--gutter) 20px; border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .dd { width: 100%; }
  .sub { display: block !important; position: static !important; border: 0 !important; box-shadow: none !important; padding: 0 0 0 16px !important; min-width: 0 !important; }
  .nav a.btn { margin-top: 12px; width: auto; padding: 11px 18px; }
  .site-header { position: relative; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .row2, .dl { grid-template-columns: 1fr; }
  .dl dt { border-bottom: 0; padding-bottom: 0; }
  .names { columns: 1; }
  .steps { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .spec-row { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media print {
  .site-header, .cookie, .cta, .site-footer .foot-grid { display: none; }
}


/* ---------- Version 2 additions ---------- */
.ico { width: 44px; height: 44px; color: var(--icon); display: block; margin-bottom: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ico .dot { fill: var(--bright); stroke: none; }
.intro-ico { width: 56px; height: 56px; margin-bottom: 18px; }
.item a.more { display: inline-block; margin-top: 14px; font-weight: 500; font-size: .96rem; }

/* dropdown */
.dd { position: relative; }
.sub { display: none; position: absolute; left: -16px; top: 100%; min-width: 250px; background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(51,75,149,.12); padding: 8px 16px; z-index: 60; }
.dd:hover .sub, .dd:focus-within .sub { display: block; }
.sub a { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.sub a:last-child { border-bottom: 0; }

/* stats band */
.stats { background: var(--navy); color: #fff; padding: clamp(40px, 6vw, 64px) 0; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.stat { border-left: 1px solid rgba(255,255,255,.28); padding-left: 24px; }
.stat .ico { color: #a9c1f5; margin-bottom: 10px; }
.stat .ico .dot { fill: #ffb199; }
.stat .num { font-family: var(--serif); font-size: clamp(2.6rem, 5vw, 3.8rem); line-height: 1; font-weight: 500; color: #fff; }
.stat .num b { color: #ffb199; font-weight: 500; }
.stat .lab { margin-top: 8px; color: #d4defa; font-size: 1rem; }
.stats-note { margin: 28px 0 0; color: #b9c9f2; font-size: .95rem; max-width: 70ch; }

/* testimonials */
.testi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.testi { background: #fff; border: 1px solid var(--line); padding: 28px 28px 24px; position: relative; }
.testi::before { content: ""; position: absolute; left: -1px; top: -1px; width: 44px; height: 4px; background: var(--bright); }
.testi .ico { width: 30px; height: 30px; margin-bottom: 10px; }
.testi .tag { font-size: .8rem; color: var(--bright); font-weight: 600; letter-spacing: .02em; margin-bottom: 8px; }
.testi blockquote { margin: 0 0 16px; font-family: var(--serif); font-size: 1.16rem; line-height: 1.5; color: var(--ink); }
.testi .who { font-size: .9rem; color: var(--slate); }

/* FAQ */
.faq { max-width: 860px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 44px 20px 0; font-family: var(--serif); font-size: 1.2rem; line-height: 1.35; color: var(--navy); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--bright); border-bottom: 2px solid var(--bright); transform: translateY(-70%) rotate(45deg); transition: transform .15s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq summary:hover { color: var(--bright); }
.faq .ans { padding: 0 44px 22px 0; color: var(--ink); }
.faq .ans p:last-child { margin-bottom: 0; }
.faq-group { font-size: .82rem; font-weight: 600; letter-spacing: .03em; color: var(--bright); margin: 36px 0 6px; text-transform: uppercase; }
.faq-group:first-child { margin-top: 0; }

.ext::after { content: " \2197"; }

@media (max-width: 960px) {
  .stats-grid { grid-template-columns: 1fr; gap: 24px; }
  .testi-grid { grid-template-columns: 1fr; }
}

/* Traditional Chinese (Hong Kong) pages: use CJK-appropriate font stacks */
html[lang="zh-Hant"] {
  --serif: "Songti TC", "PMingLiU", "Noto Serif TC", serif;
  --sans: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
}
html[lang="zh-Hant"] body { font-size: 17px; }
