/* =========================================================
   YEO ASHLEY & PARTNERS — Website Brand Stylesheet
   Based on YA_Website Look & Feel_S1R2 (prepared by Generator)
   ========================================================= */

:root {
  --evergreen: #014438;
  --evergreen-dark: #012e25;
  --evergreen-deep: #003629;
  --beige: #F8F5EB;
  --beige-alt: #F1ECDD;
  --beige-line: #E6DFC9;
  --gold: #C9A96E;
  --gold-light: #E3CC9C;
  --gold-dark: #A88750;
  --cream: #F7F2E4;
  --ink: #1A1A1A;
  --muted: #6B6B6B;

  /* Per brand guide: Pompei Std → Cormorant Garamond → Playfair Display → Georgia → serif. */
  --f-display: 'Cormorant Garamond', 'Pompei Std', 'Playfair Display', 'Noto Serif SC', Georgia, serif;
  /* Per brand guide: DM Sans Regular for body. */
  --f-body: 'DM Sans', 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  /* Per brand guide: Sloop Script One → Cormorant Garamond italic. Now actually loads italic weights. */
  --f-script: 'Cormorant Garamond', 'Pompei Std', Georgia, serif;

  --shadow-soft: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-card: 0 4px 16px rgba(1,68,56,0.06);

  --container: 1280px;
  --gutter: 2rem;
}

/* ---------- Chinese-language typography override ----------
   Chinese typographic convention is the opposite of English. Where English
   law firms use serif (宋体) for authority, professional Chinese-language
   sites use sans-serif (黑体). At screen sizes, Chinese serif has thin
   horizontal strokes that look skinny and stretched. The industry standard
   for Chinese-language legal/corporate sites (King & Wood Mallesons, JunHe,
   Yingke, Haiwen, etc.) is sans-serif throughout, with weight variation
   for hierarchy rather than family variation.

   Stack: Noto Sans SC (Google web font, primary) → Source Han Sans SC
   (Adobe, same metrics, common on macOS/Linux) → PingFang SC (macOS system)
   → Microsoft YaHei (Windows system) → Hiragino Sans GB (older macOS) →
   generic sans.
*/
html[lang="zh"] {
  --f-display: 'Noto Sans SC', 'Source Han Sans SC', 'Source Han Sans CN', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
  --f-body: 'Noto Sans SC', 'Source Han Sans SC', 'Source Han Sans CN', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
  --f-script: 'Noto Sans SC', 'Source Han Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  /* CJK glyphs are denser than Latin — slightly tighter line-height reads better */
  line-height: 1.7;
}
html[lang="zh"] body {
  /* CJK does not need Latin-style letter-spacing; "palt" enables proportional
     CJK metrics so punctuation does not look gappy */
  letter-spacing: 0;
  font-feature-settings: "palt";
}
/* Hierarchy by weight, not family — same as JunHe / King & Wood Mallesons */
html[lang="zh"] h1, html[lang="zh"] .article-title, html[lang="zh"] .hero-title {
  font-weight: 600;
  letter-spacing: 0.04em;
}
html[lang="zh"] h2 {
  font-weight: 600;
  letter-spacing: 0.04em;
}
html[lang="zh"] h3 {
  font-weight: 500;
  letter-spacing: 0.03em;
}
html[lang="zh"] strong,
html[lang="zh"] .article-body strong {
  font-weight: 600;
}
html[lang="zh"] p, html[lang="zh"] li {
  font-weight: 400;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  /* Offset anchor jumps so the sticky nav doesn't overlap the target heading */
  scroll-padding-top: 140px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
@media (max-width: 980px) {
  html { scroll-padding-top: 100px; }
}
@media (max-width: 600px) {
  html { scroll-padding-top: 80px; }
}
html, body { background: var(--beige); color: var(--ink); }

/* ---------- Focus visible (keyboard only) ---------- */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}
.nav-links a:focus-visible,
.threshold-begin:focus-visible,
.lang-toggle .lang-btn:focus-visible {
  outline-color: var(--gold-light);
}

/* ---------- Screen-reader-only utility ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Skip link (keyboard / screen-reader) ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--evergreen);
  color: var(--cream);
  padding: 0.75rem 1.25rem;
  font-family: var(--f-body);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  z-index: 1000;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  outline: 2px solid var(--gold-light);
}
body {
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color 0.18s ease, opacity 0.18s ease; }
button { font: inherit; cursor: pointer; border: 0; background: none; }

/* ---------- Typography ----------
   Brand hierarchy (Pompei Std Light fallback):
   H1/H2 = weight 400 (Light) upright — matches the refined, airy feel of Pompei Std Light.
   H3    = weight 500 for slight emphasis in card/sub-section titles.
*/
h1, h2, h3, h4, h5 {
  font-family: var(--f-display);
  color: var(--evergreen);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.15;
}
h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 400; letter-spacing: 0.04em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 400; letter-spacing: 0.06em; }
h3 { font-size: 1.4rem; font-weight: 500; letter-spacing: 0.04em; }

.caps { text-transform: uppercase; letter-spacing: 0.08em; }

.script {
  font-family: var(--f-script);
  font-style: italic;
  font-weight: 500;
  color: var(--evergreen);
  letter-spacing: 0.015em;
  /* Cormorant Garamond italic — the brand guide's specified web fallback for Sloop Script One.
     Italic weights now properly loaded from Google Fonts (was missing ital axis before). */
}

.eyebrow {
  font-family: var(--f-body);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-dark);
  font-weight: 600;
}

p { margin-bottom: 1rem; color: #2a2a2a; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: 5rem 0; }
.section-lg { padding: 7rem 0; }
.section-sm { padding: 3rem 0; }

.bg-beige { background: var(--beige); }
.bg-beige-alt { background: var(--beige-alt); }
.bg-evergreen { background: var(--evergreen); color: var(--cream); }
.bg-evergreen p { color: rgba(247,242,228,0.85); }
.bg-evergreen h1, .bg-evergreen h2, .bg-evergreen h3 { color: var(--cream); }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--beige);
  border-bottom: 1px solid rgba(1,68,56,0.08);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.35rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--evergreen);
}
/* Uses the brand primary horizontal logo PNG (regular variant). Logo sits
   large within a tight-padded nav so the overall bar stays compact (~111px
   at desktop) while the logo retains presence (~220px wide at 100px tall,
   still comfortably above brand-guide 150px min). */
.nav-brand img {
  height: 100px;
  width: auto;
  transition: height 0.3s ease;
}
@media (max-width: 960px) {
  .nav-brand img { height: 76px; }
}
@media (max-width: 520px) {
  .nav-brand img { height: 58px; }
}
.nav-brand .logo-green { display: block; }
.nav-brand .logo-white { display: none; }
.nav.transparent .nav-brand .logo-green { display: none; }
.nav.transparent .nav-brand .logo-white { display: block; }
/* Legacy constructed text (kept as fallback only if logo images don't load) */
.nav-brand-text {
  font-family: var(--f-display);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.05em;
  display: none; /* logo PNGs now carry the wordmark */
}
.nav-brand-text .top { font-size: 1.1rem; display: block; }
.nav-brand-text .bot { font-size: 1.1rem; display: block; }
.nav-brand-text .amp { font-size: 0.62rem; letter-spacing: 0.15em; opacity: 0.75; }

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
  list-style: none;
}
.nav-links a {
  font-size: 0.88rem;
  color: var(--evergreen);
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.4rem 0;
  position: relative;
}
.nav-links a.active,
.nav-links a:hover { color: var(--gold-dark); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--gold);
}

.nav-utils { display: flex; align-items: center; gap: 1rem; }
.nav-icon {
  width: 38px; height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--evergreen);
  border-radius: 4px;
  transition: background 0.18s ease;
}
.nav-icon:hover { background: rgba(1,68,56,0.06); }
.nav-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ---------- Mobile nav ---------- */
.nav-toggle { display: none; }
@media (max-width: 960px) {
  .nav-links {
    position: fixed;
    top: 88px; left: 0; right: 0;
    background: var(--beige);
    flex-direction: column;
    padding: 1.5rem var(--gutter);
    gap: 1rem;
    border-bottom: 1px solid var(--beige-line);
    transform: translateY(-120%);
    transition: transform 0.28s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 520px) {
  .nav-links { top: 70px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.9rem;
  font-family: var(--f-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
  transition: transform 0.2s ease, filter 0.2s ease;
  box-shadow: 0 2px 10px rgba(201,169,110,0.25);
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn-sm { padding: 0.55rem 1.2rem; font-size: 0.72rem; }
.btn-ghost {
  background: transparent;
  color: var(--evergreen);
  border: 1px solid var(--evergreen);
  box-shadow: none;
  clip-path: none;
  border-radius: 2px;
}
.btn-ghost:hover { background: var(--evergreen); color: var(--cream); }
.btn-read-more {
  background: transparent;
  color: var(--evergreen);
  border: 1px solid var(--evergreen);
  padding: 0.45rem 1.1rem;
  font-size: 0.72rem;
  box-shadow: none;
}
.btn-read-more:hover { background: var(--evergreen); color: var(--cream); }

/* ---------- Octagonal bordered card (signature element) ---------- */
.octa-card {
  position: relative;
  padding: 3.5rem 3rem;
  background: transparent;
  --oc-line: var(--evergreen);
}
/* Frame drawn as a closed octagonal ring (outer octagon minus inner octagon)
   so all eight edges join at the corners. The center is transparent, so the
   card reads cleanly over any hero background. */
.octa-card::before,
.octa-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--oc-line);
  opacity: 0.85;
}
.octa-card::before {
  clip-path: polygon(
    22px 0, calc(100% - 22px) 0, 100% 22px, 100% calc(100% - 22px), calc(100% - 22px) 100%, 22px 100%, 0 calc(100% - 22px), 0 22px, 22px 0,
    22px 1.5px,
    1.5px 22px, 1.5px calc(100% - 22px), 22px calc(100% - 1.5px), calc(100% - 22px) calc(100% - 1.5px), calc(100% - 1.5px) calc(100% - 22px), calc(100% - 1.5px) 22px, calc(100% - 22px) 1.5px, 22px 1.5px
  );
}
.octa-card::after {
  inset: 6px;
  opacity: 0.5;
  clip-path: polygon(
    20px 0, calc(100% - 20px) 0, 100% 20px, 100% calc(100% - 20px), calc(100% - 20px) 100%, 20px 100%, 0 calc(100% - 20px), 0 20px, 20px 0,
    20px 1px,
    1px 20px, 1px calc(100% - 20px), 20px calc(100% - 1px), calc(100% - 20px) calc(100% - 1px), calc(100% - 1px) calc(100% - 20px), calc(100% - 1px) 20px, calc(100% - 20px) 1px, 20px 1px
  );
}
.octa-card.on-green { --oc-line: var(--cream); }
.octa-card.on-green::before { opacity: 0.7; }
.octa-card.on-green::after  { opacity: 0.35; }

/* ---------- Section divider (filigree) ---------- */
.filigree {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1rem auto 2rem;
  color: var(--gold-dark);
}
.filigree::before,
.filigree::after {
  content: "";
  flex: 0 1 120px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}
.filigree .diamond {
  width: 7px; height: 7px;
  background: currentColor;
  transform: rotate(45deg);
}

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  background: var(--beige);
  padding: 4rem 0 3rem;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero-imgs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.hero-imgs .img-tile {
  aspect-ratio: 3/4;
  background: var(--evergreen);
  background-size: cover;
  background-position: center;
  filter: grayscale(100%) contrast(1.05);
}
.hero-imgs .img-tile:nth-child(1) {
  background-image: url('https://images.unsplash.com/photo-1457369804613-52c61a468e7d?auto=format&fit=crop&w=900&q=80');
  transform: translateY(1.5rem);
}
.hero-imgs .img-tile:nth-child(2) {
  background-image: url('https://images.unsplash.com/photo-1586165368502-1bad197a6461?auto=format&fit=crop&w=900&q=80');
  transform: translateY(-1.5rem);
}
.hero-copy h1 {
  font-weight: 500;
  line-height: 1.05;
}
.hero-tag {
  font-family: var(--f-script);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  color: var(--evergreen);
  line-height: 1.1;
  margin-bottom: 0.5rem;
}
.hero-sub {
  font-family: var(--f-display);
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  color: var(--evergreen);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 1.5rem;
}
.hero-lede { max-width: 44ch; margin-bottom: 2rem; color: var(--ink); opacity: 0.8; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-imgs { order: 2; }
}

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  background: var(--evergreen);
  padding: 6rem 0;
  position: relative;
}
.page-hero .octa-card {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  padding: 4rem 3rem;
}
.page-hero h1 {
  color: var(--cream);
  font-weight: 500;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}
.page-hero p {
  color: rgba(247,242,228,0.88);
  max-width: 60ch;
  margin: 0 auto;
}

/* ---------- Statement block ---------- */
.statement {
  text-align: center;
  padding: 6rem var(--gutter);
}
.statement h2 {
  font-family: var(--f-display);
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  line-height: 1.1;
}
.statement h2 span { color: var(--gold-dark); }

/* ---------- Expertise tabs (refined typographic bar) ---------- */
.tab-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: stretch;
  gap: 0;
  margin: 0 auto;
  max-width: 1040px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--beige-line);
  background: transparent;
}
.tab-bar button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 4rem;
  padding: 1.1rem 0.9rem;
  background: transparent;
  border: none;
  border-radius: 0;
  font-family: var(--f-display, 'Cormorant Garamond', serif);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--muted, #6b6b6b);
  cursor: pointer;
  white-space: normal;
  transition: color 0.2s ease, background 0.2s ease;
}
.tab-bar button:not(:last-child) { box-shadow: 1px 0 0 var(--beige-line); }
.tab-bar button::after {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: -1px;
  height: 2px;
  background: var(--gold, #C9A96E);
  opacity: 0;
  transition: left 0.25s cubic-bezier(0.2, 0.7, 0.2, 1),
              right 0.25s cubic-bezier(0.2, 0.7, 0.2, 1),
              opacity 0.2s ease;
}
.tab-bar button:hover { color: var(--evergreen, #014438); }
.tab-bar button:hover::after { left: 24%; right: 24%; opacity: 0.45; }
.tab-bar button.active {
  color: var(--evergreen, #014438);
  font-weight: 600;
}
.tab-bar button.active::after {
  left: 14%;
  right: 14%;
  opacity: 1;
}

.tab-banner {
  width: 100%;
  height: 280px;
  background-size: cover;
  background-position: center;
  filter: grayscale(100%) contrast(1.05);
}

.tab-content {
  padding: 3.5rem var(--gutter) 2rem;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.tab-content h2 {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.stage-subtitle {
  font-family: var(--f-display, 'Cormorant Garamond', serif);
  font-size: clamp(1.2rem, 1.6vw, 1.45rem);
  letter-spacing: 0.06em;
  color: var(--evergreen, #014438);
  margin-bottom: 1.8rem;
  font-style: italic;
  opacity: 0.88;
}
.service-subhead {
  display: block;
  font-family: var(--f-display, 'Cormorant Garamond', serif);
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold, #C9A96E);
  margin: 1.6rem 0 0.5rem;
  font-weight: 500;
}
.service-subhead:first-child { margin-top: 0; }
.stage-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  margin-top: 2.2rem;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.stage-pill {
  display: inline-block;
  font-family: var(--f-body, 'DM Sans', sans-serif);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  padding: 0.42rem 0.95rem;
  border: 1px solid rgba(1, 68, 56, 0.22);
  border-radius: 20px;
  color: var(--evergreen, #014438);
  background: rgba(255, 255, 255, 0.4);
}

.service-list {
  list-style: none;
  text-align: left;
  max-width: 860px;
  margin: 2rem auto 0;
}
.service-list li {
  display: flex;
  gap: 1rem;
  padding: 0.6rem 0;
  color: var(--evergreen);
  font-size: 0.95rem;
}
.service-list li::before {
  content: "♦";
  color: var(--gold);
  flex-shrink: 0;
  transform: translateY(2px);
}

@media (max-width: 1100px) {
  .tab-bar button { padding: 0.85rem 0.7rem; font-size: 0.78rem; letter-spacing: 0.05em; }
}
@media (max-width: 760px) {
  .tab-bar { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .tab-bar button { font-size: 0.74rem; min-height: 3.2rem; padding: 0.75rem 0.5rem; }
}

/* ---------- Insights grid ---------- */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.insight-card {
  display: flex;
  flex-direction: column;
  background: transparent;
}
.insight-card .img {
  aspect-ratio: 4/3;
  background-size: cover;
  background-position: center;
  filter: grayscale(100%) contrast(1.03);
  margin-bottom: 0.7rem;
}
.insight-card .date {
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
  font-weight: 500;
}
.insight-card h3 {
  font-family: var(--f-display);
  font-size: 1.05rem;
  line-height: 1.3;
  font-weight: 500;
  margin-bottom: 0.45rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--beige-line);
  color: var(--evergreen);
}
.insight-card p {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0.75rem;
  flex: 1;
}
.insight-card .btn-read-more {
  align-self: flex-start;
  padding: 0.45rem 0.85rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
}

@media (max-width: 1180px) { .insights-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 980px)  { .insights-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .insights-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .insights-grid { grid-template-columns: 1fr; } }

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}
.pagination .page {
  width: 34px; height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--evergreen);
  color: var(--evergreen);
  font-size: 0.8rem;
  transform: rotate(45deg);
  transition: background 0.18s ease, color 0.18s ease;
}
.pagination .page span { transform: rotate(-45deg); }
.pagination .page.active,
.pagination .page:hover { background: var(--evergreen); color: var(--cream); }

/* ---------- People grid ---------- */
.people-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 3rem;
}
.person .portrait {
  aspect-ratio: 3/4;
  background-size: cover;
  background-position: center;
  filter: grayscale(100%) contrast(1.03);
  margin-bottom: 1rem;
}
.person .name {
  font-family: var(--f-display);
  font-size: 1.4rem;
  color: var(--evergreen);
  margin-bottom: 0.3rem;
}
.person .role {
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-dark);
  font-weight: 600;
  margin-bottom: 0.8rem;
}
.person .bio { font-size: 0.9rem; color: var(--muted); }

@media (max-width: 900px) { .people-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .people-grid { grid-template-columns: 1fr; } }

/* ---------- Process / Stepper ---------- */
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}
.step {
  text-align: center;
  padding: 2rem 1rem;
}
.step .num {
  font-family: var(--f-display);
  font-size: 3rem;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 0.5rem;
  line-height: 1;
}
.step h3 {
  font-family: var(--f-display);
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--evergreen);
  margin-bottom: 0.8rem;
}
.step p { font-size: 0.88rem; color: var(--muted); }

@media (max-width: 900px) { .process-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .process-steps { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.contact-info h2 {
  font-family: var(--f-display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: 0.1em;
  margin-bottom: 2rem;
}
.contact-info h2::after {
  content: " ♦";
  color: var(--gold);
  font-size: 0.8em;
}
.contact-info .row {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--evergreen);
  margin-bottom: 1.2rem;
  line-height: 1.6;
}
.contact-info .row strong { font-weight: 600; }

.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.contact-form .field {
  border: 1px solid var(--evergreen);
  padding: 0.9rem 1.1rem;
  font-family: var(--f-body);
  font-size: 0.9rem;
  color: var(--evergreen);
  background: transparent;
  width: 100%;
  border-radius: 2px;
}
.contact-form .field::placeholder { color: var(--evergreen); opacity: 0.75; }
.contact-form .field:focus { outline: none; border-color: var(--gold-dark); }
.contact-form textarea.field { min-height: 160px; resize: vertical; }
.contact-form .btn { align-self: flex-start; margin-top: 0.5rem; }

@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; } }

/* ---------- Calculator block ---------- */
.calc {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  padding: 5rem var(--gutter);
  align-items: center;
}
.calc h2 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.05;
}
.calc .calc-right {
  border-left: 1px solid var(--evergreen);
  padding-left: 2.5rem;
}
.calc .calc-right p { color: var(--evergreen); margin-bottom: 1.5rem; }

@media (max-width: 860px) {
  .calc { grid-template-columns: 1fr; gap: 1.5rem; }
  .calc .calc-right { border-left: 0; padding-left: 0; border-top: 1px solid var(--evergreen); padding-top: 1.5rem; }
}

/* ---------- Expertise preview (home) ---------- */
.expertise-preview {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin-top: 3rem;
}
.expertise-preview a {
  display: block;
  aspect-ratio: 3/4;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  filter: grayscale(100%) contrast(1);
  transition: filter 0.3s ease;
}
.expertise-preview a::after {
  content: attr(data-label);
  position: absolute;
  inset: auto 0 0 0;
  padding: 1rem;
  background: linear-gradient(180deg, transparent, rgba(1,68,56,0.92));
  color: var(--cream);
  font-family: var(--f-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-align: center;
}
.expertise-preview a:hover { filter: grayscale(0%) contrast(1); }

@media (max-width: 900px) { .expertise-preview { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Brand Pattern (Secondary — logomark motif) ----------
   Subtle textures that reinforce brand identity without competing with content.
   Opacity kept very low so pattern reads as texture, not decoration.
*/
.pattern-bg-beige {
  background-image: url('../assets/ya-pattern-subtle-beige.png');
  background-repeat: repeat;
  background-size: 800px auto;
  background-blend-mode: multiply;
}
.pattern-bg-green {
  position: relative;
  isolation: isolate;
}
.pattern-bg-green::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('../assets/ya-pattern-subtle-green.png');
  background-repeat: repeat;
  background-size: 800px auto;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}
.pattern-bg-green > * { position: relative; z-index: 1; }

/* ---------- Footer ---------- */
.footer {
  background: var(--evergreen);
  color: rgba(247,242,228,0.85);
  padding: 4rem 0 2rem;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('../assets/ya-pattern-subtle-green.png');
  background-repeat: repeat;
  background-size: 720px auto;
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}
.footer > * { position: relative; z-index: 1; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(247,242,228,0.15);
}
.footer h4 {
  color: var(--cream);
  font-family: var(--f-body);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer ul { list-style: none; }
.footer a, .footer li { font-size: 0.85rem; color: rgba(247,242,228,0.75); line-height: 2; }
.footer a:hover { color: var(--gold-light); }
.footer-brand .script {
  color: var(--gold-light);
  font-size: 1.6rem;
  margin-top: 0.6rem;
}
.footer-brand .firm-role {
  color: rgba(247,242,228,0.55);
  font-family: var(--f-body);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-top: 0.5rem;
  font-weight: 500;
}
html[lang="zh"] .footer-brand .firm-role { letter-spacing: 0.4em; text-transform: none; }
.footer-bottom {
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: rgba(247,242,228,0.6);
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-2 { margin-bottom: 2rem; }
.hidden { display: none !important; }

/* ================== THEME SWITCHER ================== */
.theme-switch {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  padding: 0.25rem 0.4rem;
  border: 1px solid rgba(1,68,56,0.25);
  border-radius: 999px;
  background: rgba(255,255,255,0.4);
  margin-right: 0.5rem;
}
.theme-switch .tsw {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(1,68,56,0.2);
  cursor: pointer;
  padding: 0;
  transition: transform 0.18s ease, border-color 0.18s ease;
  position: relative;
}
.theme-switch .tsw:hover { transform: scale(1.12); }
.theme-switch .tsw.active {
  border-color: var(--evergreen);
  box-shadow: 0 0 0 2px var(--beige), 0 0 0 3px var(--evergreen);
}
.theme-switch .tsw-heritage  { background: conic-gradient(var(--evergreen) 0 40%, var(--beige) 40% 80%, var(--gold) 80%); }
.theme-switch .tsw-quiet     { background: conic-gradient(var(--evergreen) 0 10%, var(--beige) 10% 95%, var(--gold) 95%); }
.theme-switch .tsw-bold      { background: conic-gradient(var(--evergreen) 0 65%, var(--beige) 65% 90%, var(--gold) 90%); }
.theme-switch .tsw-warm      { background: conic-gradient(var(--evergreen) 0 25%, var(--beige) 25% 75%, var(--gold) 75%); }
.theme-switch .tsw-editorial { background: conic-gradient(var(--evergreen) 0 30%, var(--beige) 30% 90%, var(--gold) 90%); }

.theme-label {
  font-family: var(--f-body);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--evergreen);
  opacity: 0.7;
  margin-right: 0.3rem;
  font-weight: 600;
}
@media (max-width: 720px) {
  .theme-label { display: none; }
  .theme-switch { padding: 0.2rem 0.3rem; }
  .theme-switch .tsw { width: 18px; height: 18px; }
}

/* ================== THEME: HERITAGE (default) ==================
   Uses base variables. 40 evergreen / 40 beige / 20 gold.
=============================================================== */

/* ================== THEME: QUIET ==================
   10 evergreen / 85 beige / 5 gold. Editorial minimalism.
================================================= */
html[data-theme="quiet"] {
  --beige: #FAF7EC;
  --beige-alt: #F5F1E1;
  --beige-line: #EADEB7;
  --gold: #D4BC8A;
  --gold-light: #E8D5AC;
  --gold-dark: #A88750;
}
html[data-theme="quiet"] h1,
html[data-theme="quiet"] h2 { font-weight: 400; letter-spacing: 0.14em; }
html[data-theme="quiet"] .section { padding: 7rem 0; }
html[data-theme="quiet"] .section-lg { padding: 9rem 0; }
html[data-theme="quiet"] .page-hero {
  background: var(--beige);
  padding: 5rem 0;
}
html[data-theme="quiet"] .page-hero .octa-card::before,
html[data-theme="quiet"] .page-hero .octa-card::after {
  --oc-line: var(--evergreen);
  opacity: 0.55;
}
html[data-theme="quiet"] .page-hero h1 { color: var(--evergreen); }
html[data-theme="quiet"] .page-hero p,
html[data-theme="quiet"] .page-hero .script { color: var(--evergreen) !important; }
html[data-theme="quiet"] .page-hero .script { color: var(--gold-dark) !important; opacity: 0.85; }
html[data-theme="quiet"] .bg-evergreen { background: var(--beige-alt); color: var(--evergreen); }
html[data-theme="quiet"] .bg-evergreen h1,
html[data-theme="quiet"] .bg-evergreen h2,
html[data-theme="quiet"] .bg-evergreen h3 { color: var(--evergreen); }
html[data-theme="quiet"] .bg-evergreen p { color: #333; }
html[data-theme="quiet"] .octa-card.on-green::before,
html[data-theme="quiet"] .octa-card.on-green::after { --oc-line: var(--evergreen); opacity: 0.4; }
html[data-theme="quiet"] .bg-evergreen .script { color: var(--gold-dark) !important; }
html[data-theme="quiet"] .btn { box-shadow: none; background: var(--evergreen); color: var(--beige); }
html[data-theme="quiet"] .footer { background: var(--evergreen); }

/* ================== THEME: BOLD ==================
   65 evergreen / 25 beige / 10 gold. Confident, heavy.
================================================= */
html[data-theme="bold"] {
  --evergreen: #002A21;
  --evergreen-dark: #001912;
  --gold: #B0884E;
  --gold-dark: #8F6C3A;
}
html[data-theme="bold"] body { background: var(--evergreen); color: var(--beige); }
html[data-theme="bold"] h1,
html[data-theme="bold"] h2 { font-weight: 600; letter-spacing: 0.04em; }
html[data-theme="bold"] .nav { background: var(--evergreen); border-bottom-color: rgba(247,242,228,0.12); }
html[data-theme="bold"] .nav-brand { color: var(--beige); }
html[data-theme="bold"] .nav-links a { color: var(--beige); }
html[data-theme="bold"] .nav-links a.active,
html[data-theme="bold"] .nav-links a:hover { color: var(--gold-light); }
html[data-theme="bold"] .nav-icon { color: var(--beige); }
html[data-theme="bold"] .nav-icon:hover { background: rgba(247,242,228,0.08); }
html[data-theme="bold"] .theme-switch { background: rgba(247,242,228,0.08); border-color: rgba(247,242,228,0.2); }
html[data-theme="bold"] .theme-label { color: var(--beige); opacity: 0.7; }
html[data-theme="bold"] .theme-switch .tsw { border-color: rgba(247,242,228,0.4); }
html[data-theme="bold"] .theme-switch .tsw.active { box-shadow: 0 0 0 2px var(--evergreen), 0 0 0 3px var(--beige); }
html[data-theme="bold"] .bg-beige,
html[data-theme="bold"] .bg-beige-alt { background: var(--evergreen); color: var(--beige); }
html[data-theme="bold"] .bg-beige h1,
html[data-theme="bold"] .bg-beige h2,
html[data-theme="bold"] .bg-beige h3,
html[data-theme="bold"] .bg-beige-alt h1,
html[data-theme="bold"] .bg-beige-alt h2,
html[data-theme="bold"] .bg-beige-alt h3 { color: var(--beige); }
html[data-theme="bold"] .bg-beige p,
html[data-theme="bold"] .bg-beige-alt p { color: rgba(247,242,228,0.85); }
html[data-theme="bold"] .hero { background: var(--evergreen); color: var(--beige); }
html[data-theme="bold"] .hero-tag,
html[data-theme="bold"] .hero-sub,
html[data-theme="bold"] .hero-copy h1 { color: var(--beige); }
html[data-theme="bold"] .hero-tag { color: var(--gold-light); }
html[data-theme="bold"] .hero-lede { color: rgba(247,242,228,0.85); }
html[data-theme="bold"] .octa-card::before,
html[data-theme="bold"] .octa-card::after { --oc-line: var(--beige); opacity: 0.6; }
html[data-theme="bold"] .statement h2 { color: var(--beige); }
html[data-theme="bold"] .statement h2 span { color: var(--gold-light); }
html[data-theme="bold"] .eyebrow { color: var(--gold-light); }
html[data-theme="bold"] .tab-bar { border-color: rgba(247,242,228,0.18); }
html[data-theme="bold"] .tab-bar button { color: rgba(247,242,228,0.65); }
html[data-theme="bold"] .tab-bar button:hover,
html[data-theme="bold"] .tab-bar button.active { color: var(--beige); }
html[data-theme="bold"] .tab-bar button::after { background: var(--gold-light); }
html[data-theme="bold"] .insight-card h3 { color: var(--beige); border-bottom-color: rgba(247,242,228,0.2); }
html[data-theme="bold"] .insight-card .date { color: var(--gold-light); }
html[data-theme="bold"] .insight-card p { color: rgba(247,242,228,0.75); }
html[data-theme="bold"] .btn-read-more { color: var(--beige); border-color: var(--beige); }
html[data-theme="bold"] .btn-read-more:hover { background: var(--beige); color: var(--evergreen); }
html[data-theme="bold"] .pagination .page { color: var(--beige); border-color: var(--beige); }
html[data-theme="bold"] .pagination .page.active,
html[data-theme="bold"] .pagination .page:hover { background: var(--beige); color: var(--evergreen); }
html[data-theme="bold"] .contact-form .field { border-color: var(--beige); color: var(--beige); }
html[data-theme="bold"] .contact-form .field::placeholder { color: rgba(247,242,228,0.7); }
html[data-theme="bold"] .contact-info h2,
html[data-theme="bold"] .contact-info .row { color: var(--beige); }
html[data-theme="bold"] .calc h2,
html[data-theme="bold"] .calc .calc-right p { color: var(--beige); }
html[data-theme="bold"] .calc .calc-right { border-left-color: var(--gold); }
html[data-theme="bold"] .btn { padding: 1rem 2.2rem; font-size: 0.85rem; }

/* ================== THEME: WARM ==================
   25 evergreen / 50 beige / 25 gold. Hospitable, gold-forward.
================================================= */
html[data-theme="warm"] {
  --beige: #F6EED9;
  --beige-alt: #F0E5C5;
  --beige-line: #E2CF95;
  --gold: #D2A968;
  --gold-light: #E9CD95;
  --gold-dark: #B0884E;
}
html[data-theme="warm"] .eyebrow { color: var(--gold-dark); }
html[data-theme="warm"] .filigree { color: var(--gold-dark); }
html[data-theme="warm"] .filigree::before,
html[data-theme="warm"] .filigree::after { height: 2px; opacity: 0.7; }
html[data-theme="warm"] .filigree .diamond { width: 10px; height: 10px; }
html[data-theme="warm"] h1,
html[data-theme="warm"] h2 { letter-spacing: 0.07em; }
html[data-theme="warm"] .hero-tag { color: var(--gold-dark); }
html[data-theme="warm"] .page-hero { background: var(--evergreen); }
html[data-theme="warm"] .page-hero .octa-card::before,
html[data-theme="warm"] .page-hero .octa-card::after { --oc-line: var(--gold-light); opacity: 0.85; }
html[data-theme="warm"] .btn { box-shadow: 0 4px 18px rgba(210,169,104,0.35); }
html[data-theme="warm"] .bg-beige-alt { background: linear-gradient(180deg, var(--beige), var(--beige-alt)); }
html[data-theme="warm"] .octa-card::before { --oc-line: var(--gold-dark); opacity: 0.7; }
html[data-theme="warm"] .octa-card::after { --oc-line: var(--gold); opacity: 0.5; }
html[data-theme="warm"] .nav-links a.active { color: var(--gold-dark); }
html[data-theme="warm"] .nav-links a.active::after { background: var(--gold-dark); height: 3px; }
html[data-theme="warm"] .person .role { color: var(--gold-dark); }
html[data-theme="warm"] .step .num { color: var(--gold-dark); font-weight: 600; }
html[data-theme="warm"] .insight-card h3 { border-bottom-color: var(--gold); }

/* =====================================================================
   THRESHOLD HERO — signature home page moment.
   Full-bleed duotone photo, logomark motif, single statement, begin link.
===================================================================== */
.threshold {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--evergreen-dark);
  isolation: isolate;
}
.threshold-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: url(#ya-duotone) contrast(1.08);
  opacity: 0.55;
  animation: threshold-breathe 18s ease-in-out infinite;
  z-index: 0;
}
.threshold-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 25%, rgba(1,27,20,0.85) 100%);
}
@keyframes threshold-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
.threshold-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 2rem;
  max-width: 1100px;
  color: var(--cream);
}
.threshold-mark {
  width: 72px;
  height: 72px;
  opacity: 0.88;
  filter: brightness(0) invert(0.95);
  margin: 0 auto 2.5rem;
  display: block;
}
.threshold-title {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(2.8rem, 7.5vw, 6.4rem);
  line-height: 1.05;
  letter-spacing: 0.015em;
  color: var(--cream);
  margin: 0 0 2rem;
}
.threshold-title em {
  font-style: italic;
  font-weight: 300;
  color: var(--gold-light);
}
.threshold-sub {
  font-family: var(--f-script);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.1rem, 2vw, 1.65rem);
  color: var(--gold-light);
  letter-spacing: 0.04em;
  opacity: 0.96;
  margin: -1rem 0 2.25rem;
  line-height: 1.35;
}
.threshold-eyebrow {
  font-family: var(--f-body);
  font-size: 0.68rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--gold-light);
  opacity: 0.82;
  margin-bottom: 3.75rem;
}
html[lang="zh"] .threshold-sub {
  font-style: normal;
  letter-spacing: 0.18em;
  font-weight: 300;
}
.threshold-begin {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  color: var(--cream);
  font-family: var(--f-body);
  font-size: 0.78rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  padding: 0.9rem 0.2rem;
  position: relative;
  text-decoration: none;
}
.threshold-begin::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--gold-light);
  transform: scaleX(0.32);
  transform-origin: left;
  transition: transform 0.55s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.threshold-begin:hover::after { transform: scaleX(1); }
.threshold-begin:hover .arrow { transform: translateX(8px); }
.threshold-begin .arrow {
  display: inline-block;
  transition: transform 0.35s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.threshold-scroll-cue {
  position: absolute;
  bottom: 2.4rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--gold-light);
  font-size: 0.6rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  opacity: 0.7;
  z-index: 2;
  animation: scroll-bounce 2.4s ease-in-out infinite;
}
.threshold-scroll-cue .diamond {
  width: 5px; height: 5px;
  background: var(--gold-light);
  transform: rotate(45deg);
}
@keyframes scroll-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(6px); }
}

/* ===========================================================
   DUOTONE — premium B&W treatment.
   Applied via filter: url(#ya-duotone). SVG lives in each page.
=========================================================== */
.duotone { filter: url(#ya-duotone) contrast(1.05); }

/* ===========================================================
   OCTAGONAL CARD — corner ornaments for weight + craft.
=========================================================== */
.octa-card {
  border: none; /* frames live in ::before/::after already */
}
.octa-card::before { border-width: 1.5px; opacity: 0.92; }
.octa-card::after  { border-width: 1px;   opacity: 0.55; }
.octa-card .ornaments {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.octa-card .ornaments i {
  position: absolute;
  width: 6px; height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
}
.octa-card .ornaments i:nth-child(1) { top: 20px; left: 20px; }
.octa-card .ornaments i:nth-child(2) { top: 20px; right: 20px; }
.octa-card .ornaments i:nth-child(3) { bottom: 20px; left: 20px; }
.octa-card .ornaments i:nth-child(4) { bottom: 20px; right: 20px; }
.octa-card.on-green .ornaments i { background: var(--gold-light); opacity: 0.85; }

/* ===========================================================
   SECTION RHYTHM — deliberate variance, not a metronome.
=========================================================== */
.section-xs { padding: 3rem 0; }
.section-sm { padding: 5rem 0; }
.section-md { padding: 8rem 0; }
.section-lg { padding: 10rem 0; }
.section-xl { padding: 14rem 0; }
@media (max-width: 860px) {
  .section-xl { padding: 8rem 0; }
  .section-lg { padding: 6rem 0; }
  .section-md { padding: 5rem 0; }
}

/* ===========================================================
   NAV — scroll-responsive (backdrop blur + hairline on scroll).
=========================================================== */
.nav {
  transition: background 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
}
.nav.transparent {
  background: transparent;
  border-bottom-color: transparent;
}
.nav.scrolled {
  background: rgba(248,245,235,0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid rgba(201,169,110,0.35);
  box-shadow: 0 1px 24px rgba(1,68,56,0.06);
}
.nav.transparent .nav-brand,
.nav.transparent .nav-links a,
.nav.transparent .nav-icon { color: var(--cream); }
.nav.transparent .nav-links a.active { color: var(--gold-light); }
.nav.transparent .nav-links a.active::after { background: var(--gold-light); }
.nav.transparent .nav-brand img { filter: brightness(0) invert(0.95); }
.nav.transparent .lang-toggle {
  border-color: rgba(247,242,228,0.4);
  background: rgba(247,242,228,0.08);
}
.nav.transparent .lang-toggle .lang-btn { color: var(--cream); }
.nav.transparent .lang-toggle .lang-sep { background: rgba(247,242,228,0.4); }

/* ===========================================================
   REVEAL — subtle fade-up on scroll (IntersectionObserver).
=========================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.6, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.6, 0.2, 1);
}
/* Noscript fallback: if JS is disabled, show revealed content by default. */
.no-js .reveal { opacity: 1; transform: none; transition: none; }
.reveal.in { opacity: 1; transform: none; }
.reveal.delay-1 { transition-delay: 0.08s; }
.reveal.delay-2 { transition-delay: 0.16s; }
.reveal.delay-3 { transition-delay: 0.24s; }
.reveal.delay-4 { transition-delay: 0.32s; }
.reveal.delay-5 { transition-delay: 0.40s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .threshold-image, .threshold-mark, .threshold-scroll-cue { animation: none !important; }
}

/* ===========================================================
   CARD HOVER LIFT — subtle, premium, on all content cards.
=========================================================== */
.insight-card,
.octa-card {
  transition: transform 0.5s cubic-bezier(0.2, 0.6, 0.2, 1), box-shadow 0.5s ease;
}
.insight-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -24px rgba(1,68,56,0.18);
}
.insight-card .img {
  transition: transform 0.8s cubic-bezier(0.2, 0.6, 0.2, 1);
  overflow: hidden;
}
.insight-card:hover .img { transform: scale(1.03); }

/* ===========================================================
   SECTION DIVIDER — logomark ornament between sections.
=========================================================== */
.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem 0;
  opacity: 0.7;
}
.section-divider::before,
.section-divider::after {
  content: "";
  flex: 0 1 140px;
  height: 1px;
  background: var(--gold);
  opacity: 0.45;
}
.section-divider img {
  width: 28px;
  height: 28px;
  opacity: 0.55;
}

/* ===========================================================
   STATEMENT — editorial pacing override.
=========================================================== */
.statement h2 {
  font-weight: 300;
  letter-spacing: 0.14em;
  line-height: 1.1;
}
.statement p {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.85;
  color: #444;
}

/* ===========================================================
   BODY COPY — editorial breathing room.
=========================================================== */
.prose p,
.hero-lede {
  font-size: clamp(1rem, 1.2vw, 1.08rem);
  line-height: 1.85;
}

/* ================== THEME: EDITORIAL ==================
   30 evergreen / 60 beige / 10 gold. Magazine feel.
================================================= */
html[data-theme="editorial"] {
  --beige: #F9F5E8;
  --beige-alt: #F2EBD5;
  --f-body: 'DM Sans', 'Inter', sans-serif;
}
html[data-theme="editorial"] h1 { font-size: clamp(3rem, 6vw, 5.5rem); font-weight: 400; letter-spacing: 0.02em; line-height: 1; }
html[data-theme="editorial"] h2 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); font-weight: 400; letter-spacing: 0.04em; }
html[data-theme="editorial"] h3 { font-weight: 500; }
html[data-theme="editorial"] p { font-size: 1.05rem; line-height: 1.75; }
html[data-theme="editorial"] .eyebrow { letter-spacing: 0.3em; font-size: 0.68rem; }
html[data-theme="editorial"] .container { max-width: 1140px; }
html[data-theme="editorial"] .section { padding: 7rem 0; }
html[data-theme="editorial"] .hero-tag { font-size: clamp(2.8rem, 5vw, 4.2rem); font-style: italic; }
html[data-theme="editorial"] .filigree::before,
html[data-theme="editorial"] .filigree::after { flex-basis: 180px; height: 1px; opacity: 0.35; }
html[data-theme="editorial"] .insight-card h3 { font-size: 1.55rem; padding-bottom: 0.8rem; border-bottom-width: 2px; }
html[data-theme="editorial"] .insight-card { gap: 0.3rem; }
html[data-theme="editorial"] .statement h2 { font-weight: 400; letter-spacing: 0.08em; }
html[data-theme="editorial"] .btn { letter-spacing: 0.22em; font-weight: 500; padding: 1rem 2.4rem; }
html[data-theme="editorial"] blockquote { font-family: var(--f-display); font-weight: 400; font-style: italic; }

/* =====================================================================
   CHINESE TYPOGRAPHY — the three Song-style brand fonts.
   Files are loaded from assets/fonts/ (provided by the firm's brand team).
     Primary A  — 猴尊宋体 (Hou Zun Song Ti)    — headlines, formal
     Primary B  — 南西初夏宋 (Nan Xi Chu Xia Song) — softer alt primary, threshold
     Secondary  — 文源宋体 (Wen Yuan Serif SC)  — body, longer content
===================================================================== */

/* Primary A — 猴尊宋体 (single weight) — display / headlines */
@font-face {
  font-family: '猴尊宋体';
  src: url('../assets/fonts/HouZunSongTi.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'HouZun SongTi';
  src: url('../assets/fonts/HouZunSongTi.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

/* Primary B — 南西初夏宋 (single weight) — softer primary / threshold */
@font-face {
  font-family: '南西初夏宋';
  src: url('../assets/fonts/NanXiChuXiaSong.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'NanXi ChuXia Song';
  src: url('../assets/fonts/NanXiChuXiaSong.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

/* Secondary — 文源宋体 (multi-weight Song-style) — body and long-form */
@font-face {
  font-family: '文源宋体';
  src: url('../assets/fonts/WenYuanSerifSC-Light.woff2') format('woff2');
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: '文源宋体';
  src: url('../assets/fonts/WenYuanSerifSC-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: '文源宋体';
  src: url('../assets/fonts/WenYuanSerifSC-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: '文源宋体';
  src: url('../assets/fonts/WenYuanSerifSC-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'WenYuan SerifSC';
  src: url('../assets/fonts/WenYuanSerifSC-Light.woff2') format('woff2');
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: 'WenYuan SerifSC';
  src: url('../assets/fonts/WenYuanSerifSC-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'WenYuan SerifSC';
  src: url('../assets/fonts/WenYuanSerifSC-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'WenYuan SerifSC';
  src: url('../assets/fonts/WenYuanSerifSC-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

html[lang="zh"] {
  /* v2 allocation — brand guide's by-the-book pairing:
     Display / headings / script → 猴尊宋体 (HouZun SongTi) — formal, structured, authoritative, single weight 400
     Body / long copy            → 文源宋体 (WenYuan Serif SC) — multi-weight readable body
     Hierarchy in display comes from size + letter-spacing (single weight).
     Hierarchy in body comes from weight (300/400/500/700). */
  --f-display: '猴尊宋体', 'HouZun SongTi', '文源宋体', 'WenYuan SerifSC', 'Source Han Serif SC', 'Noto Serif SC', 'Songti SC', 'STSong', serif;
  --f-body: '文源宋体', 'WenYuan SerifSC', 'Source Han Serif SC', 'Noto Serif SC', 'Songti SC', 'STSong', serif;
  --f-script: '猴尊宋体', 'HouZun SongTi', '文源宋体', 'WenYuan SerifSC', 'Source Han Serif SC', 'Noto Serif SC', serif;
}
html[lang="zh"] body { line-height: 1.95; }

/* Chinese display headings (猴尊宋体, single weight 400).
   All H1/H2/H3 use weight 400 — differentiation comes from size clamps
   (inherited from default h1/h2/h3 rules) + letter-spacing below. */
html[lang="zh"] h1 { font-weight: 400; letter-spacing: 0.12em; }
html[lang="zh"] h2 { font-weight: 400; letter-spacing: 0.12em; }
html[lang="zh"] h3 { font-weight: 400; letter-spacing: 0.08em; }
html[lang="zh"] .caps { text-transform: none; letter-spacing: 0.18em; }

/* Chinese script class: Light weight, slightly larger letter-spacing for the
   "quiet accent" feel. No italic (Chinese italic reads wrong). */
html[lang="zh"] .script {
  font-family: var(--f-script);
  font-style: normal;
  font-weight: 300;
  letter-spacing: 0.1em;
}

/* Chinese body text — generous breathing */
html[lang="zh"] p { line-height: 1.95; letter-spacing: 0.02em; }
html[lang="zh"] .prose p,
html[lang="zh"] .hero-lede { line-height: 2.05; letter-spacing: 0.03em; }

/* Eyebrow in Chinese: wider tracking */
html[lang="zh"] .eyebrow { letter-spacing: 0.42em; }

/* Threshold hero in Chinese: 文源宋体 Light (300) at huge size.
   Weight 300 gives the elegant, airy quality that Pompei Std Light delivers in Latin. */
html[lang="zh"] .threshold-title {
  font-family: var(--f-display);
  font-weight: 300;
  letter-spacing: 0.22em;
  font-size: clamp(3.5rem, 10vw, 7.5rem);
  line-height: 1.2;
}
html[lang="zh"] .threshold-title em {
  font-style: normal;
  font-family: inherit;
  color: var(--gold-light);
}
html[lang="zh"] .threshold-eyebrow { letter-spacing: 0.5em; }
html[lang="zh"] .threshold-begin { letter-spacing: 0.36em; font-size: 0.82rem; }
html[lang="zh"] .threshold-scroll-cue { letter-spacing: 0.42em; }

/* Chinese mode logomark slightly larger, still static */
html[lang="zh"] .threshold-mark {
  width: 84px; height: 84px;
}

/* Statement h2 in Chinese: bigger + heavier tracking */
html[lang="zh"] .statement h2 {
  font-weight: 300;
  letter-spacing: 0.2em;
  line-height: 1.55;
}

/* Card titles */
/* Card titles use 文源宋体 Medium (500) for quiet emphasis */
html[lang="zh"] .octa-card h3 { font-weight: 500; letter-spacing: 0.1em; }

/* Nav in Chinese: slightly more tracking */
html[lang="zh"] .nav-links a { letter-spacing: 0.14em; font-size: 0.9rem; }
html[lang="zh"] .eyebrow { letter-spacing: 0.25em; }
html[lang="zh"] .nav-brand-text .top,
html[lang="zh"] .nav-brand-text .bot { letter-spacing: 0.08em; }

/* ================== LANG TOGGLE ================== */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(1,68,56,0.25);
  border-radius: 999px;
  background: rgba(255,255,255,0.4);
  margin-right: 0.5rem;
  font-family: var(--f-body);
}
.lang-toggle .lang-btn {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--evergreen);
  opacity: 0.5;
  padding: 0 0.2rem;
  transition: opacity 0.18s ease;
  min-width: 18px;
}
.lang-toggle .lang-btn:hover { opacity: 0.85; }
.lang-toggle .lang-btn.active { opacity: 1; }
.lang-toggle .lang-sep {
  display: inline-block;
  width: 1px;
  height: 13px;
  background: rgba(1,68,56,0.35);
}
html[data-theme="bold"] .lang-toggle {
  background: rgba(247,242,228,0.08);
  border-color: rgba(247,242,228,0.25);
}
html[data-theme="bold"] .lang-toggle .lang-btn { color: var(--beige); }
html[data-theme="bold"] .lang-toggle .lang-sep { background: rgba(247,242,228,0.4); }

/* =========================================================
   ARTICLE PAGE — Lab / Insights individual articles
   ========================================================= */
.article-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 6rem var(--gutter) 4rem;
}
.article-page .article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  margin-bottom: 1.6rem;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}
.article-page .article-meta .tag {
  background: var(--evergreen);
  color: var(--cream);
  padding: 0.25rem 0.7rem;
  letter-spacing: 0.16em;
}
.article-page .article-meta .dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold);
}
.article-page h1.article-title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.18;
  letter-spacing: 0.01em;
  margin-bottom: 1.2rem;
  color: var(--evergreen);
}
.article-page .article-lede {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 2.5rem;
  padding-bottom: 1.8rem;
  border-bottom: 1px solid var(--beige-line);
}
.article-page .article-body h2 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  margin: 2.6rem 0 1rem;
  color: var(--evergreen);
}
.article-page .article-body h3 {
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 1.8rem 0 0.6rem;
  color: var(--evergreen-dark);
}
.article-page .article-body p,
.article-page .article-body li {
  font-size: 1rem;
  line-height: 1.85;
  color: #2a2a2a;
  margin-bottom: 0.9rem;
}
.article-page .article-body ul,
.article-page .article-body ol { padding-left: 1.4rem; margin-bottom: 1rem; }
.article-page .article-body strong { color: var(--evergreen-dark); font-weight: 600; }
.article-page .article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0 2rem;
  font-size: 0.92rem;
}
.article-page .article-body th,
.article-page .article-body td {
  border: 1px solid var(--beige-line);
  padding: 0.7rem 0.9rem;
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
}
.article-page .article-body th {
  background: var(--beige-alt);
  font-weight: 600;
  color: var(--evergreen-dark);
  font-family: var(--f-body);
  letter-spacing: 0.02em;
}
.article-page .article-body blockquote,
.article-page .pull-quote {
  margin: 1.8rem 0;
  padding: 1.2rem 1.4rem;
  background: var(--beige-alt);
  border-left: 3px solid var(--gold);
  font-style: italic;
  font-family: var(--f-display);
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--evergreen-dark);
}
.article-page .references-block {
  margin-top: 3rem;
  padding: 1.4rem 1.6rem;
  background: rgba(1,68,56,0.04);
  border-left: 3px solid var(--evergreen);
}
.article-page .references-block .ref-title {
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--evergreen);
  margin-bottom: 0.8rem;
}
.article-page .references-block ul { padding-left: 1.2rem; margin: 0; }
.article-page .references-block li {
  font-size: 0.88rem;
  line-height: 1.6;
  color: #2a2a2a;
  margin-bottom: 0.35rem;
}
.article-page .article-disclaimer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--beige-line);
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--muted);
  font-style: italic;
}
.article-page .article-byline {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--beige-line);
  font-size: 0.86rem;
  color: var(--muted);
}
.article-page .article-byline strong { color: var(--evergreen-dark); }
.article-page .back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 2rem;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--evergreen);
  text-decoration: none;
  font-weight: 500;
}
.article-page .back-link:hover { color: var(--gold-dark); }

/* Related articles */
.related-articles {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--gutter) 5rem;
}
.related-articles .related-title {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 1.4rem;
  text-align: center;
  color: var(--evergreen);
  margin-bottom: 2rem;
  letter-spacing: 0.04em;
}
.related-articles .related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
}
@media (max-width: 900px) { .related-articles .related-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .related-articles .related-grid { grid-template-columns: 1fr; } }

/* Insights filter (used on main page) */
.insights-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 auto 2.5rem;
  padding: 0 var(--gutter);
  max-width: 1180px;
}
.insights-filter .filter-btn {
  padding: 0.55rem 1.15rem;
  border: 1px solid var(--evergreen);
  background: transparent;
  color: var(--evergreen);
  font-family: var(--f-body);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}
.insights-filter .filter-btn:hover { background: rgba(1,68,56,0.06); }
.insights-filter .filter-btn.is-active { background: var(--evergreen); color: var(--cream); }
html[lang="zh"] .insights-filter .filter-btn { letter-spacing: 0.2em; font-size: 0.74rem; }

.insight-card .tag {
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold-dark);
  margin-bottom: 0.4rem;
}
.insight-card.is-hidden { display: none; }

/* en-only / zh-only paired sibling pattern (for HTML-rich content i18n.js can't switch) */
html[lang="en"] .zh-only,
html[lang="zh"] .en-only { display: none !important; }



/* ============================================================
   Cookie consent banner (js/consent.js)
   ============================================================ */
#ya-consent {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  background: #014438;
  color: #F7F2E4;
  border: 1px solid rgba(201, 169, 110, 0.4);
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(1, 30, 24, 0.35);
  font-family: var(--f-body, 'DM Sans', sans-serif);
  font-size: 0.92rem;
  line-height: 1.55;
  transform: translateY(0);
  opacity: 1;
  transition: opacity .2s ease, transform .2s ease;
}
#ya-consent.ya-consent-hide { opacity: 0; transform: translateY(12px); pointer-events: none; }
.ya-consent-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 1.25rem;
}
.ya-consent-msg { margin: 0; flex: 1; color: #E8DEC6; }
.ya-consent-msg a { color: #C9A96E; text-decoration: underline; text-underline-offset: 3px; }
.ya-consent-msg a:hover { color: #F0DBA5; }
.ya-consent-actions { display: flex; gap: 0.6rem; flex-shrink: 0; }
.ya-consent-btn {
  font: inherit;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: background .15s, color .15s, border-color .15s;
}
.ya-consent-essential {
  background: transparent;
  color: #E8DEC6;
  border-color: rgba(232, 222, 198, 0.4);
}
.ya-consent-essential:hover { border-color: #E8DEC6; }
.ya-consent-accept {
  background: #C9A96E;
  color: #014438;
}
.ya-consent-accept:hover { background: #F0DBA5; }
@media (max-width: 720px) {
  .ya-consent-inner { flex-direction: column; align-items: stretch; gap: 0.9rem; }
  .ya-consent-actions { justify-content: flex-end; }
}

/* ============================================================
   Floating contact button
   ============================================================ */
.ya-float-cta {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9998;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.3rem;
  background: #014438;
  color: #F7F2E4;
  border: 1px solid rgba(201, 169, 110, 0.5);
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(1, 30, 24, 0.28);
  font-family: var(--f-body, 'DM Sans', sans-serif);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.ya-float-cta:hover {
  background: #015a48;
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(1, 30, 24, 0.36);
}
.ya-float-cta svg { width: 18px; height: 18px; fill: #C9A96E; }
@media (max-width: 600px) {
  .ya-float-cta { padding: 0.7rem 1rem; font-size: 0.85rem; right: 14px; bottom: 14px; }
}

/* ============================================================
   Article meta strip (date + reading time)
   ============================================================ */
.article-meta-strip {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin: 0.4rem 0 1.4rem;
  color: var(--gold-dark, #A88750);
  font-family: var(--f-body, 'DM Sans', sans-serif);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.article-meta-strip span + span:before {
  content: "·";
  margin-right: 1rem;
  opacity: 0.6;
}

/* ============================================================
   Insight card meta strip (read time + date)
   ============================================================ */
.insight-card .card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gold-dark, #A88750);
  font-family: var(--f-body, 'DM Sans', sans-serif);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0.4rem 0 0.6rem;
}
.insight-card .card-meta .meta-dot { opacity: 0.5; }

/* ============================================================
   Insights search + filter row
   ============================================================ */
.insights-search {
  position: relative;
  max-width: 380px;
  margin: 0 auto 1.4rem;
}
.insights-search input {
  width: 100%;
  padding: 0.85rem 1.1rem 0.85rem 2.6rem;
  font: inherit;
  font-size: 0.95rem;
  background: rgba(247, 242, 228, 0.7);
  border: 1px solid var(--beige-line, rgba(168,135,80,0.3));
  border-radius: 999px;
  color: var(--evergreen, #014438);
  transition: border-color .15s, background .15s;
}
.insights-search input::placeholder { color: var(--gold-dark, #A88750); opacity: 0.7; }
.insights-search input:focus {
  outline: none;
  border-color: var(--evergreen, #014438);
  background: #fff;
}
.insights-search:before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A88750' stroke-width='2'><circle cx='11' cy='11' r='7'/><path d='M21 21l-4.3-4.3'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}
.insights-empty {
  display: none;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted, #6b6b6b);
  font-family: var(--f-body, 'DM Sans', sans-serif);
}
.insights-empty.is-shown { display: block; }

/* ============================================================
   Person card LinkedIn icon
   ============================================================ */
.person { position: relative; }
.person-linkedin {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(247, 242, 228, 0.85);
  color: var(--evergreen, #014438);
  border: 1px solid rgba(168,135,80,0.25);
  transition: background .15s, color .15s;
  z-index: 2;
}
.person-linkedin:hover { background: var(--evergreen, #014438); color: var(--cream, #F7F2E4); }
.person-linkedin[data-linkedin-placeholder] { opacity: 0.55; }
.person-linkedin[data-linkedin-placeholder]:hover { opacity: 1; }

/* ============================================================
   Lazy background helper — soft fade in once loaded
   ============================================================ */
.lazy-bg-loaded { animation: ya-bg-fade 320ms ease-in; }
@keyframes ya-bg-fade { from { opacity: 0.4; } to { opacity: 1; } }

/* ============================================================
   Careers teaser on home (#careers)
   ============================================================ */
.careers-teaser {
  padding: 9rem 0;
  background: var(--cream);
}
.careers-teaser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.6rem;
  max-width: 1100px;
  margin: 0 auto;
}
.careers-teaser-card {
  background: #fff;
  padding: 2rem 1.8rem;
  border-radius: 14px;
  border: 1px solid var(--beige-line);
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.careers-teaser-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(1,30,24,0.08);
}
.careers-teaser-card .role-tag {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-dark);
  padding: 0.35rem 0.8rem;
  border: 1px solid rgba(168,135,80,0.3);
  border-radius: 999px;
  margin-bottom: 1rem;
}
.careers-teaser-card h3 {
  font-family: var(--f-display);
  font-size: 1.45rem;
  letter-spacing: 0.04em;
  color: var(--evergreen);
  margin: 0 0 0.7rem;
}
.careers-teaser-card p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.92rem;
  margin: 0 0 1.4rem;
}
.careers-teaser-card .apply-teaser-link {
  margin-top: auto;
  align-self: flex-start;
  color: var(--evergreen);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--gold-dark);
  padding-bottom: 2px;
  transition: color .15s, border-color .15s;
}
.careers-teaser-card .apply-teaser-link:hover { color: var(--gold-dark); }

/* ============================================================
   Home #contact section — info block (mirrors contact.html)
   ============================================================ */
.lt-contact-info {
  margin-top: 2rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(168,135,80,0.25);
  color: var(--evergreen);
  font-size: 0.92rem;
  line-height: 1.85;
  max-width: 38ch;
}
.lt-contact-row { margin-bottom: 0.6rem; }
.lt-contact-row strong {
  font-family: var(--f-body);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--gold-dark);
  margin-right: 0.3rem;
}
.lt-contact-row a { color: var(--evergreen); text-decoration: none; border-bottom: 1px solid rgba(168,135,80,0.4); }
.lt-contact-row a:hover { border-color: var(--evergreen); }
@media (max-width: 860px) {
  .lt-contact-info { max-width: none; }
}

/* ============================================================
   Expertise — deep practice-area detail grid
   ============================================================ */
.practice-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}
.practice-block {
  background: var(--cream, #F7F2E4);
  padding: 2rem 2rem 1.6rem;
  border-radius: 14px;
  border: 1px solid var(--beige-line, rgba(168,135,80,0.2));
  position: relative;
}
.practice-block .eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-dark, #A88750);
  margin-bottom: 1rem;
  font-family: var(--f-body, 'DM Sans', sans-serif);
}
.practice-block ul { list-style: none; padding: 0; margin: 0; }
.practice-block li {
  position: relative;
  padding: 0.45rem 0 0.45rem 1.4rem;
  color: var(--evergreen, #014438);
  line-height: 1.7;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(168, 135, 80, 0.12);
}
.practice-block li:last-child { border-bottom: none; }
.practice-block li:before {
  content: "•";
  position: absolute;
  left: 0.4rem;
  top: 0.45rem;
  color: var(--gold-dark, #A88750);
  font-size: 1rem;
  line-height: 1.7;
}
.practice-block .service-list li,
.practice-block .situation-list li,
.practice-block .legal-anchors li,
.practice-block .related-insights li { padding-left: 1.4rem; }
.practice-block .legal-anchors li {
  font-size: 0.9rem;
}
.practice-block .legal-anchors li strong {
  font-weight: 600;
  color: var(--evergreen, #014438);
}
.practice-block .legal-anchors li span {
  display: block;
  color: var(--muted, #6b6b6b);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  margin-top: 0.1rem;
}
.practice-block .related-insights a {
  color: var(--evergreen, #014438);
  text-decoration: none;
  border-bottom: 1px solid rgba(168, 135, 80, 0.4);
  transition: color .15s, border-color .15s;
  font-size: 0.93rem;
}
.practice-block .related-insights a:hover {
  color: var(--gold-dark, #A88750);
  border-color: var(--gold-dark, #A88750);
}
.practice-block .situation-list li {
  font-style: italic;
  color: var(--evergreen, #014438);
  opacity: 0.92;
}
html[lang="zh"] .practice-block .situation-list li { font-style: normal; }
@media (max-width: 860px) {
  .practice-detail-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .practice-block { padding: 1.6rem 1.4rem 1.2rem; }
}

/* ============================================================
   People — magazine-style profiles (Ashley Yeo / Ee Von Goh)
   ============================================================ */
.person-profile {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 3.5rem;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto 5rem;
  padding: 2.5rem 0;
  position: relative;
}
.person-profile + .person-profile {
  border-top: 1px solid var(--beige-line, rgba(168,135,80,0.25));
  padding-top: 4rem;
}
.person-profile.reverse {
  grid-template-columns: 1fr 320px;
}
.person-profile.reverse .person-portrait-wrap { order: 2; }
.person-profile.reverse .person-detail { order: 1; }

.person-portrait-wrap {
  position: sticky;
  top: 5rem;
  width: 100%;
  background: var(--beige-alt, #F8F5EB);
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border: 1px solid var(--beige-line, rgba(168,135,80,0.25));
}
.person-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Name header sticks alongside the portrait until the next person scrolls in. */
.person-header {
  position: sticky;
  top: 5rem;
  z-index: 2;
  background: var(--beige, #F8F5EB);
  padding-bottom: 1.25rem;
}
.person-header .person-tagline { margin-bottom: 0; }

.person-detail .person-eyebrow {
  font-family: var(--f-body, 'DM Sans', sans-serif);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dark, #A88750);
  margin-bottom: 0.6rem;
}
.person-detail .person-name {
  font-family: var(--f-display, 'Cormorant Garamond', serif);
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  letter-spacing: 0.03em;
  color: var(--evergreen, #014438);
  line-height: 1.05;
  margin: 0 0 0.8rem;
}
.person-detail .person-tagline {
  font-family: var(--f-display, 'Cormorant Garamond', serif);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--gold-dark, #A88750);
  margin-bottom: 2rem;
  letter-spacing: 0.02em;
}
html[lang="zh"] .person-detail .person-tagline {
  font-style: normal;
  letter-spacing: 0.06em;
}

.person-bio p {
  color: var(--evergreen, #014438);
  line-height: 1.85;
  font-size: 1rem;
  margin: 0 0 1.2rem;
}
.person-bio p:last-child { margin-bottom: 0; }

.person-credentials {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem 2.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--beige-line, rgba(168,135,80,0.25));
}
.cred-block .cred-label {
  font-family: var(--f-body, 'DM Sans', sans-serif);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-dark, #A88750);
  margin-bottom: 0.8rem;
}
.cred-block ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.cred-block li {
  color: var(--evergreen, #014438);
  font-size: 0.92rem;
  line-height: 1.6;
  padding: 0.25rem 0;
}
.cred-block .cred-contact li a {
  color: var(--evergreen, #014438);
  text-decoration: none;
  border-bottom: 1px solid rgba(168, 135, 80, 0.4);
  transition: color .15s, border-color .15s;
}
.cred-block .cred-contact li a:hover {
  color: var(--gold-dark, #A88750);
  border-color: var(--gold-dark, #A88750);
}
.cred-block .cred-links li a {
  color: var(--evergreen, #014438);
  text-decoration: none;
  border-bottom: 1px dotted rgba(168, 135, 80, 0.45);
  transition: color .15s, border-color .15s;
}
.cred-block .cred-links li a:hover,
.cred-block .cred-links li a:focus {
  color: var(--gold-dark, #A88750);
  border-bottom-style: solid;
  border-bottom-color: var(--gold-dark, #A88750);
}

@media (max-width: 860px) {
  .person-profile,
  .person-profile.reverse {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }
  .person-profile.reverse .person-portrait-wrap { order: 0; }
  .person-profile.reverse .person-detail { order: 0; }
  .person-portrait-wrap {
    position: relative;
    top: 0;
    max-width: 280px;
    margin: 0 auto;
  }
  .person-credentials {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }
}

/* ============================================================
   People — Team & Operations grid (people.html)
   ============================================================ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.6rem;
  max-width: 1100px;
  margin: 0 auto;
}
.team-card {
  background: var(--cream, #F7F2E4);
  border: 1px solid var(--beige-line, rgba(168,135,80,0.25));
  border-radius: 14px;
  padding: 1.8rem 1.6rem 1.6rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.team-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(1,30,24,0.08);
  border-color: rgba(168,135,80,0.5);
}
.team-card-portrait {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  margin: 0 auto 1.2rem;
  background: var(--beige-alt, #F8F5EB);
  background-size: cover;
  background-position: center top;
  border: 1px solid rgba(168,135,80,0.25);
  box-shadow: 0 2px 8px rgba(1,68,56,0.08);
}
.team-card-portrait.is-placeholder {
  background: var(--evergreen, #014438);
  color: var(--cream, #F7F2E4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-display, 'Cormorant Garamond', serif);
  font-size: 1.8rem;
  letter-spacing: 0.06em;
}
.team-card-portrait.is-placeholder::before { content: attr(data-initials); }
.team-card-name {
  font-family: var(--f-display, 'Cormorant Garamond', serif);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: var(--evergreen, #014438);
  margin: 0 0 0.3rem;
  line-height: 1.2;
}
.team-card-role {
  font-family: var(--f-body, 'DM Sans', sans-serif);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-dark, #A88750);
  margin-bottom: 1rem;
}
.team-card-bio {
  color: var(--muted, #6b6b6b);
  font-size: 0.88rem;
  line-height: 1.7;
  margin: 0;
}
@media (max-width: 600px) {
  .team-grid { grid-template-columns: 1fr; gap: 1.2rem; }
}

/* ---------- Neat left & right edges on ALL body copy (AY feedback 10 Jun) ---------- */
p,
li,
.faq-a {
  text-align: justify;
  text-justify: inter-word;
  hyphens: none;
}
/* Chinese: justify without awkward inter-word gaps */
html[lang="zh"] p,
html[lang="zh"] li,
html[lang="zh"] .faq-a {
  text-justify: inter-character;
}
/* Keep intentionally centred copy centred (short lines, hero/statement/cards) */
.center p, .center li,
.preview-banner p,
.design-hero-copy p,
.about-copy p,
.vm-card p,
.value-cell p,
.why-card p, .why-card .why-copy,
.expertise-lede,
.team-intro p,
.statement p,
.page-hero .octa-card p,
.octa-card p,
.tab-content p,
.step p,
.step-detail p,
.threshold-content p,
.testimonial p,
.insights-empty p,
.faq-disclaimer,
.cta-inner p {
  text-align: center;
}
/* Four lifecycle stages as four tidy lines (AY: "4 parts in 4 para") */
.expertise-lede-stages p {
  text-align: center;
  margin: 0.35em 0;
}
/* Footer, nav and button-like elements: keep natural left alignment */
footer p, footer li,
.footer p, .footer li,
.footer-designer p, .footer-designer li,
nav li, .nav li, .btn, .apply-link {
  text-align: left;
}
