:root {
  --paper: #faf8f3;
  --paper-2: #f2eee4;
  --ink: #1d2226;
  --ink-soft: #555d63;
  --line: #e2ddd1;
  --navy: #0e3a66;
  --orange: #e8601a;
  --orange-dark: #c94f12;
  --highlight: #ffe66d;
  --red-pen: #d63a2f;
  --radius: 4px;
  --hand: "Caveat", "Hannotate SC", "Kaiti SC", cursive;
  --sans: "Source Sans 3", -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 18px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--navy); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* Language switching: show only the active language */
html[data-lang="en"] [lang="zh"],
html[data-lang="zh"] [lang="en"] { display: none !important; }
html[data-lang="zh"] body { font-size: 17px; letter-spacing: .02em; }

mark {
  background: linear-gradient(transparent 55%, var(--highlight) 55%, var(--highlight) 92%, transparent 92%);
  color: inherit;
  padding: 0 .1em;
}

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(250, 248, 243, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; letter-spacing: .04em; }
.brand img { width: 40px; height: 40px; border-radius: 6px; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 16px; }
.nav a:hover { color: var(--orange); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.lang-toggle {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font: 600 14px var(--sans); padding: 6px 10px; border-radius: var(--radius); cursor: pointer;
}
.lang-toggle:hover { border-color: var(--ink-soft); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: var(--radius);
  font-weight: 700; font-size: 17px; text-decoration: none; white-space: nowrap;
  border: 2px solid transparent; transition: background .15s, border-color .15s;
}
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn-call { background: var(--orange); color: #fff; }
.btn-call:hover { background: var(--orange-dark); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--paper-2); }
.btn-sm { padding: 8px 14px; font-size: 15px; }
.show-xs { display: none; }

/* Hero */
.hero { padding: 56px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.eyebrow { font-weight: 700; color: var(--navy); font-size: 15px; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 16px; }
h1 { font-size: clamp(36px, 5vw, 56px); font-weight: 800; letter-spacing: -.01em; }
.lead { font-size: 20px; color: var(--ink-soft); max-width: 36em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 22px; }
.ticks { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--ink-soft); font-size: 16px; }
.ticks li::before { content: "✓"; color: var(--orange); font-weight: 800; margin-right: 6px; }

.hero-photo { position: relative; margin: 0; }
.hero-photo img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border: 10px solid #fff; box-shadow: 0 10px 30px rgba(0,0,0,.12);
  transform: rotate(1.2deg);
}

/* Handwritten notes, matching the social-post style */
.note {
  font-family: var(--hand); font-weight: 700; color: var(--ink);
  background: #fff; padding: 6px 12px; line-height: 1.25;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.note-hero {
  position: absolute; left: -28px; bottom: 36px; font-size: 26px; transform: rotate(-3deg);
  border-left: 4px solid var(--red-pen);
}
.note-inline { display: inline-block; font-size: 24px; margin-top: 8px; transform: rotate(-.8deg); border-left: 4px solid var(--red-pen); }
html[data-lang="zh"] .note { font-size: 20px; }

/* Sections */
.section { padding: 80px 0; }
.section-paper { background: var(--paper-2); border-block: 1px solid var(--line); }
.section-title { font-size: clamp(30px, 3.6vw, 40px); font-weight: 800; }
.section-sub { color: var(--ink-soft); margin: -8px 0 36px; }

.services {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 2px solid var(--ink); margin-top: 28px;
}
.service { padding: 26px 26px 26px 0; border-bottom: 1px solid var(--line); }
.service:not(:nth-child(3n+1)) { padding-left: 26px; border-left: 1px solid var(--line); }
.service h3 { font-size: 21px; }
.service p { margin: 0; color: var(--ink-soft); font-size: 17px; }

/* Cases */
.cases { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.case { background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; }
.case-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: #fff; padding: 8px 8px 0; }
.case-photos figure { position: relative; margin: 0; }
.case-photos img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.tag {
  position: absolute; left: 8px; bottom: 8px;
  background: #fff; color: var(--ink); font: 700 14px var(--sans);
  padding: 2px 8px; text-transform: uppercase; letter-spacing: .05em;
}
.case-body { padding: 20px 22px 24px; }
.case-body h3 { font-size: 22px; }
.case-body p { margin: 0; color: var(--ink-soft); font-size: 17px; }
.case-wide { grid-column: 1 / -1; flex-direction: row; }
.case-wide .case-photos-one { grid-template-columns: 1fr; width: 38%; flex: none; padding: 8px; }
.case-wide .case-photos-one img { aspect-ratio: 4 / 3; height: 100%; }
.case-wide .case-body { align-self: center; padding: 28px 32px; }
.case-wide .case-body p + p { margin-top: 14px; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: step; }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 18px; }
.steps li::before {
  content: counter(step); display: block;
  font: 700 46px/1 var(--hand); color: var(--orange); margin-bottom: 8px;
}
.steps h3 { font-size: 21px; }
.steps p { margin: 0; color: var(--ink-soft); font-size: 17px; }

/* About */
.about { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: start; }
.about p { color: var(--ink-soft); }
.facts { margin: 0; background: #fff; border: 1px solid var(--line); padding: 8px 24px; }
.facts div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: .05em; color: var(--navy); }
.facts dd { margin: 0; font-size: 17px; }

/* Contact */
.contact { text-align: center; }
.contact h2 { font-size: clamp(30px, 4vw, 46px); font-weight: 800; }
.contact p { color: var(--ink-soft); font-size: 19px; }
.contact-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }

.footer { background: var(--ink); color: #c9cdd0; font-size: 15px; padding: 26px 0; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.footer p { margin: 0; }
.footer a { color: #fff; }

.sticky-call { display: none; }

/* Tablet */
@media (max-width: 900px) {
  .nav { display: none; }
  .topbar-actions { margin-left: auto; }
  .hero { padding: 32px 0 56px; }
  .hero-grid, .about { grid-template-columns: 1fr; gap: 40px; }
  .hero-photo { max-width: 420px; margin-inline: auto; }
  .note-hero { left: -8px; }
  .services { grid-template-columns: 1fr 1fr; }
  .service, .service:not(:nth-child(3n+1)) { padding: 22px 20px 22px 0; border-left: 0; }
  .service:nth-child(2n) { padding-left: 20px; border-left: 1px solid var(--line); }
  .cases { grid-template-columns: 1fr; }
  .case-wide { flex-direction: column; }
  .case-wide .case-photos-one { width: auto; }
}

/* Phone */
@media (max-width: 600px) {
  body { font-size: 17px; }
  .section { padding: 56px 0; }
  .hide-xs { display: none; }
  .show-xs { display: inline; }
  .brand span { font-size: 16px; }
  .hero-cta .btn { flex: 1 1 100%; }
  .services { grid-template-columns: 1fr; }
  .service, .service:nth-child(2n) { padding: 20px 0; border-left: 0; }
  .steps { grid-template-columns: 1fr; gap: 24px; }
  .facts { padding: 4px 16px; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
  .contact-cta .btn { flex: 1 1 100%; }
  .footer { padding-bottom: 84px; }
  .sticky-call {
    display: block; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 20;
    background: var(--orange); color: #fff; text-align: center; text-decoration: none;
    font-weight: 700; padding: 14px; border-radius: var(--radius);
    box-shadow: 0 6px 18px rgba(0,0,0,.25);
  }
}
