:root {
  --forest: #0b211a;
  --forest-soft: #16342a;
  --ivory: #f1ecdf;
  --paper: #f8f3e9;
  --ink: #19231f;
  --muted: #626b65;
  --gold: #b88652;
  --gold-light: #e0c49c;
  --line: rgba(31, 48, 40, .18);
  --gutter: clamp(20px, 5vw, 76px);
  --sans: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --serif: "Iowan Old Style", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; background: var(--forest); }
html:focus-within { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
a { color: inherit; }
button, select { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  color: var(--forest);
  background: white;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.site-header {
  --header-ink: #f7f2e8;
  position: fixed;
  z-index: 30;
  inset: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  grid-template-areas: "brand nav language";
  align-items: center;
  gap: 20px;
  padding: 14px var(--gutter);
  color: var(--header-ink);
  border-bottom: 1px solid rgba(255,255,255,.18);
  background: transparent;
  backdrop-filter: blur(8px);
  transition: color .25s ease, border-color .25s ease;
}
.site-header.on-light { --header-ink: var(--ink); border-bottom-color: rgba(25,35,31,.2); }
.site-header.on-light .brand-definition { color: rgba(25,35,31,.68); }
.site-header.on-light .site-language { border-color: rgba(25,35,31,.4); }
.site-header.on-light .site-language option { color: var(--ink); background: var(--ivory); }
.brand {
  grid-area: brand;
  display: inline-flex;
  flex-direction: column;
  width: max-content;
  max-width: min(360px, 100%);
  text-decoration: none;
}
.sig-names { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.sig-zh { font: 600 22px/1 var(--serif); letter-spacing: .04em; }
.sig-en { font: 500 14px/1.1 var(--serif); letter-spacing: .035em; opacity: .9; }
.brand-definition {
  margin-top: 5px;
  font: 400 11px/1.3 var(--sans);
  letter-spacing: .04em;
  color: rgba(247,242,232,.75);
}
.site-nav {
  grid-area: nav;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(12px, 1.6vw, 25px);
  min-width: 0;
}
.site-nav a {
  position: relative;
  padding-block: 10px;
  font-size: 12px;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
  opacity: .82;
}
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a[aria-current="page"] { opacity: 1; }
.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 3px;
  left: 0;
  height: 1px;
  background: var(--gold-light);
}
.site-language {
  grid-area: language;
  position: relative;
  width: 90px;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 999px;
}
.site-language::after {
  content: "";
  pointer-events: none;
  position: absolute;
  top: 42%;
  right: 12px;
  width: 6px;
  height: 6px;
  border: solid currentColor;
  border-width: 0 1px 1px 0;
  transform: rotate(45deg);
}
.site-language select {
  appearance: none;
  width: 100%;
  min-height: 36px;
  padding: 5px 25px 5px 12px;
  color: inherit;
  border: 0;
  outline: 0;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
}
.site-language select:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.site-language option { color: #f7f2e8; background: var(--forest); }
.menu-toggle { display: none; grid-area: menu; }
.menu-glyph { display: inline-flex; flex-direction: column; gap: 5px; }
.menu-glyph::before, .menu-glyph::after { content: ""; width: 17px; height: 1px; background: currentColor; }

.page-hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #f7f2e8;
  background: var(--forest);
}
.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7,24,18,.98) 0%, rgba(7,24,18,.88) 38%, rgba(7,24,18,.38) 70%, rgba(7,24,18,.2) 100%),
    radial-gradient(circle at 80% 50%, rgba(184,134,82,.30), transparent 35%),
    var(--hero-image, none) center/cover no-repeat;
  transform: scale(1.01);
}
.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4,16,12,.1), transparent 58%, rgba(4,16,12,.84));
}
.hero-content {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  padding: clamp(150px, 22vh, 230px) var(--gutter) clamp(55px, 9vh, 100px);
}
.eyebrow {
  margin: 0 0 18px;
  color: var(--gold-light);
  font: 600 11px/1.3 var(--sans);
  letter-spacing: .18em;
  text-transform: uppercase;
}
.hero-title {
  max-width: 720px;
  margin: 0;
  font: 500 clamp(45px, 6vw, 86px)/.98 var(--serif);
  letter-spacing: -.035em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.hero-subtitle {
  margin: 18px 0 0;
  color: rgba(247,242,232,.82);
  font: 500 clamp(15px, 1.5vw, 20px)/1.35 var(--sans);
  letter-spacing: .04em;
}
html[data-lang-mode="bilingual"] body[data-page="representation"] .hero-title {
  white-space: pre-line;
  font-size: clamp(36px, 5.4vw, 75px);
  line-height: 1.12;
}
.hero-summary {
  max-width: 660px;
  margin: 24px 0 0;
  color: rgba(247,242,232,.82);
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.75;
}
.agency-entry-note {
  margin-top: 20px;
  padding-left: 14px;
  border-left: 1px solid #bcac88;
  color: #f7f2e8;
  font-size: 14px;
  line-height: 1.5;
}
.agency-entry-note p { margin: 0; }
.agency-entry-note a {
  display: inline-block;
  padding: 3px 0;
  color: #f3d5a5;
  text-underline-offset: 4px;
  text-decoration: underline;
}
.agency-entry-note a:hover { color: white; }
.agency-entry-note a:focus-visible { outline: 2px solid white; outline-offset: 3px; }

.hero-actions, .final-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.button {
  min-width: 0;
  max-width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 22px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary { color: var(--forest); background: #f3d5a5; border-color: #f3d5a5; }
.button-secondary { color: inherit; border-color: rgba(255,255,255,.5); }
.button:focus-visible { outline: 2px solid white; outline-offset: 4px; }

.page-directory {
  position: sticky;
  z-index: 15;
  top: 0;
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 64px;
  padding: 10px var(--gutter);
  color: var(--ink);
  background: rgba(241,236,223,.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  overflow-x: auto;
  scrollbar-width: none;
}
.page-directory::-webkit-scrollbar { display: none; }
.page-directory[hidden], .section-intro[hidden] { display: none; }
.directory-label {
  flex: 0 0 auto;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.directory-links { display: flex; gap: 18px; min-width: max-content; }
.directory-links a {
  color: #3d4943;
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
}
.directory-links a:hover, .directory-links a:focus-visible { color: #000; text-decoration: underline; text-underline-offset: 5px; }

.page-content {
  min-height: 100svh;
  padding: clamp(85px, 12vw, 150px) var(--gutter);
  background: var(--ivory);
}
.section-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, .7fr);
  gap: 32px;
  align-items: end;
  margin-bottom: clamp(38px, 6vw, 72px);
}
.section-intro h2 {
  margin: 0;
  max-width: 760px;
  font: 500 clamp(34px, 4.4vw, 62px)/1.08 var(--serif);
  letter-spacing: -.03em;
  overflow-wrap: anywhere;
}
.section-intro p { margin: 0; color: var(--muted); line-height: 1.75; }
body[data-page="china-market-entry"]:not(.section-view) .page-content {
  min-height: 0;
  padding-block: clamp(38px, 5.7vw, 88px);
  scroll-margin-top: var(--inner-header-height, 104px);
}
.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}
.content-card {
  scroll-margin-top: calc(var(--inner-header-height, 120px) + 12px);
  min-height: 340px;
  padding: clamp(28px, 4vw, 54px);
  background: var(--paper);
}
.content-card:nth-child(3n) { background: #e9e2d2; }
.content-grid > .content-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.content-card h3, .card-heading h2 {
  margin: 28px 0 0;
  font: 500 clamp(27px, 3vw, 42px)/1.12 var(--serif);
  letter-spacing: -.02em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.card-heading { display: flex; align-items: start; justify-content: space-between; gap: 18px; }
.card-heading :is(h2, h3) { margin-top: 0; }
.card-deep-link {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  text-decoration: none;
  font-size: 17px;
}
.card-deep-link:hover, .card-deep-link:focus-visible { color: white; background: var(--forest); }
.content-card .card-subtitle {
  margin: 10px 0 0;
  color: var(--gold);
  font: 600 12px/1.4 var(--sans);
  letter-spacing: .05em;
}
.content-card .card-summary { margin: 20px 0 0; color: var(--muted); line-height: 1.75; }
.detail-list {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.detail-list li { display: grid; gap: 6px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.detail-title { font-weight: 700; }
.detail-body { color: var(--muted); font-size: 14px; line-height: 1.65; }
.section-note { margin: 24px 0 0; padding-left: 14px; color: var(--muted); border-left: 2px solid var(--gold); font-size: 14px; line-height: 1.65; }
.detail-title[href] { color: inherit; text-underline-offset: 4px; }
.content-card#offices .detail-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; }
.content-card#offices .detail-list li { min-width: 0; padding-inline: 12px; border-right: 1px solid var(--line); }
.content-card#offices .detail-list li:first-child { padding-left: 0; }
.content-card#offices .detail-list li:last-child { padding-right: 0; border-right: 0; }
.section-view .page-hero, .section-view .page-directory, .section-view .page-final { display: none; }
.section-view .page-content { min-height: 100svh; padding-top: clamp(150px, 18vw, 220px); background: var(--ivory); }
.section-view .content-grid { grid-template-columns: minmax(0, 900px); background: transparent; border: 0; }
.section-view .content-card { min-height: 0; border: 1px solid var(--line); }
.section-view .content-card .card-subtitle { margin-top: 0; }
.section-view .content-title { margin: 0; max-width: 880px; font: 500 clamp(38px, 5vw, 70px)/1.04 var(--serif); letter-spacing: -.035em; }
.section-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
}
.section-nav .button-secondary { color: var(--ink); border-color: var(--line); }
.section-nav .next-section { margin-left: auto; }

.page-final {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  padding: clamp(95px, 12vw, 160px) var(--gutter) 48px;
  color: #f7f2e8;
  background:
    radial-gradient(circle at 85% 25%, rgba(184,134,82,.18), transparent 36%),
    linear-gradient(155deg, #0b211a, #07140f 68%);
}
.cases-panel { scroll-margin-top: calc(var(--inner-header-height, 120px) + 12px); display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); gap: clamp(35px, 7vw, 100px); }
.cases-copy h2 { margin: 0; font: 500 clamp(36px, 4.5vw, 64px)/1.05 var(--serif); letter-spacing: -.03em; }
.cases-heading { display: flex; align-items: start; gap: 18px; }
.cases-heading h2 { flex: 1 1 auto; }
html[data-lang-mode="bilingual"] .cases-heading h2 {
  font-size: clamp(32px, 3.75vw, 52px);
  text-wrap: balance;
}
.case-deep-link { color: inherit; border-color: rgba(255,255,255,.28); }
.cases-copy p { margin: 22px 0 0; color: rgba(247,242,232,.68); line-height: 1.75; }
.case-list { display: grid; gap: 12px; }
.service-brand-names { margin: 0 0 12px; font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }
.service-brand-names strong { font-weight: 600; }
.brand-reference { display: inline-block; white-space: pre; }
.case-logos {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.case-logos img {
  width: 100%;
  height: 90px;
  padding: 14px;
  object-fit: contain;
  background: var(--paper);
}
.case-logos img.on-dark { background: #352f30; }
body[data-page="representation"]:not(.section-view) .page-content {
  min-height: auto;
  padding-block: clamp(36px, 5vw, 76px);
}
body[data-page="representation"] .content-card { min-height: 0; }
body[data-page="representation"] .page-final { min-height: auto; }
body[data-page="representation"] .final-cta { margin-top: clamp(32px, 5vw, 72px); }
.case-item, .case-pending {
  min-height: 190px;
  padding: clamp(25px, 3vw, 40px);
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.035);
}
.case-item h3, .case-pending h3 { margin: 0; font: 500 25px/1.2 var(--serif); }
.case-item p, .case-pending p { margin: 16px 0 0; color: rgba(247,242,232,.65); line-height: 1.7; }
.case-pending { display: grid; place-content: center; border-style: dashed; }
.pending-mark { width: 38px; height: 1px; margin-bottom: 24px; background: var(--gold-light); }
.final-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
  margin-top: clamp(85px, 12vw, 160px);
  padding-top: clamp(50px, 7vw, 90px);
  border-top: 1px solid rgba(255,255,255,.2);
}
.final-cta h2 { max-width: 760px; margin: 0; font: 500 clamp(38px, 5vw, 72px)/1.02 var(--serif); letter-spacing: -.035em; }
.final-cta h2 { overflow-wrap: anywhere; }
.final-cta p { max-width: 650px; margin: 20px 0 0; color: rgba(247,242,232,.68); line-height: 1.7; }
.final-actions { justify-content: flex-end; }
.legal-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: clamp(70px, 10vw, 130px);
  padding-top: 24px;
  color: rgba(247,242,232,.5);
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 1280px) {
  .site-header { grid-template-columns: minmax(220px, 1fr) auto; grid-template-areas: "brand language" "nav nav"; gap: 8px 18px; padding-block: 10px; }
  .site-nav { justify-content: space-between; }
  .site-nav a { font-size: 11px; }
  .brand-definition { display: none; }
}

@media (max-width: 767px) {
  :root { --gutter: 18px; }
  .site-header { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "brand menu language"; gap: 8px; min-height: 72px; padding-block: 9px; }
  .brand-name { font-size: 19px; }
  .sig-zh { font-size: 19px; }
  .sig-en { font-size: 12px; }
  .site-language { width: 78px; }
  .site-language select { min-height: 40px; padding-left: 9px; font-size: 11px; }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 7px;
    color: inherit;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
  }
  .site-nav {
    position: fixed;
    inset: 72px 0 auto;
    display: grid;
    gap: 0;
    padding: 10px var(--gutter) 24px;
    background: transparent;
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,.15);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform .22s ease, opacity .22s ease, visibility .22s ease;
  }
  .site-nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .site-nav a { min-height: 46px; display: flex; align-items: center; border-bottom: 1px solid rgba(255,255,255,.12); font-size: 13px; }
  .site-nav a[aria-current="page"]::after { display: none; }
  .page-hero { min-height: 92svh; }
  .hero-backdrop {
    background:
      linear-gradient(180deg, rgba(7,24,18,.32), rgba(7,24,18,.6) 35%, rgba(7,24,18,.96) 76%),
      var(--hero-image, none) 62% center/cover no-repeat,
      var(--forest);
  }
  .hero-content { padding-top: 210px; padding-bottom: 48px; }
  .hero-title { font-size: clamp(39px, 12vw, 56px); }
  html[data-lang-mode="bilingual"] body[data-page="representation"] .hero-title {
    font-size: clamp(33px, 10.8vw, 55px);
  }
  .hero-subtitle { font-size: 14px; }
  .hero-summary { font-size: 15px; }
  .hero-actions .button { flex: 1 1 100%; }
  .page-directory { top: 0; min-height: 58px; gap: 16px; padding-inline: var(--gutter); }
  .directory-label { display: none; }
  .directory-links { gap: 20px; }
  .section-intro { grid-template-columns: 1fr; align-items: start; }
  .content-grid { grid-template-columns: 1fr; }
  .content-grid > .content-card:last-child:nth-child(odd) { grid-column: auto; }
  .content-card { min-height: 0; padding: 34px 24px 38px; }
  .cases-panel { grid-template-columns: 1fr; }
  .case-logos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case-item, .case-pending { min-height: 170px; }
  .final-cta { grid-template-columns: 1fr; align-items: start; }
  .final-actions { justify-content: flex-start; }
  .final-actions .button { width: 100%; }
  .legal-footer { flex-direction: column; }
  .content-card#offices .detail-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-card#offices .detail-list li { padding-inline: 0; border-right: 0; }
  .section-nav .button, .section-nav .next-section { width: 100%; margin-left: 0; }
}

@media (max-width: 420px) {
  :root { --gutter: 14px; }
  .site-header { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand brand" "menu language"; }
  .brand { max-width: 100%; }
  .menu-toggle { justify-self: start; min-height: 32px; padding-left: 0; }
  .site-nav { inset-block-start: 102px; }
  .hero-content { padding-top: 220px; }
}

/* Match the approved bilingual homepage signature: brand/language above, navigation below. */
html:lang(zh) .site-header {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "brand language" "rule rule" "nav nav";
  grid-template-rows: auto 6px auto;
  gap: 0 16px;
  padding-block: 13px 2px;
  border-bottom-color: rgba(203,184,142,.18);
}
html:lang(zh) .site-header::before,
html:lang(zh) .site-header::after {
  content: "";
  grid-area: rule;
  align-self: center;
  pointer-events: none;
}
html:lang(zh) .site-header::before {
  height: 1px;
  margin-inline-start: 29px;
  background: linear-gradient(90deg, #a88b5f, rgba(188,163,118,.38) 27%, rgba(188,163,118,.19));
}
html:lang(zh) .site-header::after {
  width: 20px;
  height: 6px;
  box-sizing: border-box;
  justify-self: start;
  border: 1px solid #bfa16d;
  border-radius: 6px;
  background: linear-gradient(90deg, #bfa16d 50%, transparent 50%);
}
html:lang(zh) .site-header .brand { margin-block-end: 10px; }
html:lang(zh) .brand-definition { display: block; }
html:lang(zh) .site-language { margin-block-end: 8px; border-color: #6d7c69; }
@media (min-width: 768px) {
  html:lang(zh) .site-nav {
    justify-self: stretch;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    padding-block: 2px;
  }
  html:lang(zh) .site-nav a {
    min-height: 44px;
    font-size: clamp(13px, 1.02vw, 16px);
    letter-spacing: .04em;
    color: inherit;
  }
}
@media (max-width: 767px) {
  html:lang(zh) .site-header {
    grid-template-areas: "brand brand" "rule rule" "menu language";
    padding-block: 10px 4px;
  }
  html:lang(zh) .site-header .brand { margin-block-end: 7px; }
  html:lang(zh) .site-language { margin: 0; }
  html:lang(zh) .menu-toggle { justify-self: start; padding-inline: 0 8px; min-height: 44px; }
  html:lang(zh) .site-nav { grid-template-columns: 1fr; inset-block-start: 110px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
