/* =========================================================
   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;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--beige); color: var(--ink); }
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.9rem 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. Two variants swap based on nav
   state (transparent over hero = white; scrolled / beige = evergreen). */
.nav-brand img { height: 60px; width: auto; }
@media (max-width: 720px) {
  .nav-brand img { height: 48px; }
}
.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: 72px; 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; }
}

/* ---------- 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;
}
.octa-card::before,
.octa-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  clip-path: polygon(26px 0, calc(100% - 26px) 0, 100% 26px, 100% calc(100% - 26px), calc(100% - 26px) 100%, 26px 100%, 0 calc(100% - 26px), 0 26px);
  border: 1px solid var(--evergreen);
  opacity: 0.85;
}
.octa-card::after { inset: 6px; opacity: 0.5; }
.octa-card.on-green::before,
.octa-card.on-green::after {
  border-color: var(--cream);
  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 ---------- */
.tab-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-bottom: 1px solid var(--beige-line);
  margin-bottom: 0;
}
.tab-bar button {
  padding: 1rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--evergreen);
  background: var(--beige);
  border-right: 1px solid var(--beige-line);
  transition: background 0.18s ease, color 0.18s ease;
  text-align: center;
}
.tab-bar button:last-child { border-right: 0; }
.tab-bar button.active {
  background: var(--evergreen);
  color: var(--cream);
}
.tab-bar button:hover:not(.active) { background: var(--beige-alt); }

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

.tab-content {
  padding: 3rem var(--gutter);
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.tab-content h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.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: 720px) {
  .tab-bar { grid-template-columns: repeat(2, 1fr); }
  .tab-bar button { border-bottom: 1px solid var(--beige-line); }
}

/* ---------- Insights grid ---------- */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  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: 1rem;
}
.insight-card .date {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
  font-weight: 500;
}
.insight-card h3 {
  font-family: var(--f-display);
  font-size: 1.35rem;
  font-weight: 500;
  margin-bottom: 0.6rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--beige-line);
  color: var(--evergreen);
}
.insight-card p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 1rem;
  flex: 1;
}
.insight-card .btn-read-more { align-self: flex-start; }

@media (max-width: 900px) { .insights-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .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-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 {
  border-color: 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 { border-color: 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 { border-color: 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 button { background: var(--evergreen); color: var(--beige); border-color: rgba(247,242,228,0.15); }
html[data-theme="bold"] .tab-bar button.active { background: var(--gold-dark); color: var(--beige); }
html[data-theme="bold"] .tab-bar button:hover:not(.active) { background: var(--evergreen-dark); }
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: linear-gradient(180deg, var(--evergreen), #01362B); }
html[data-theme="warm"] .page-hero .octa-card::before,
html[data-theme="warm"] .page-hero .octa-card::after { border-color: 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 { border-color: var(--gold-dark); opacity: 0.7; }
html[data-theme="warm"] .octa-card::after { border-color: 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;
  animation: threshold-rotate 180s linear infinite;
}
@keyframes threshold-rotate {
  to { transform: rotate(360deg); }
}
.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-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;
}
.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);
}
.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"] {
  /* DECISION: single-font Chinese system. 文源宋体 (Wen Yuan Serif SC) everywhere.
     Typographic hierarchy created by weight (Light / Regular / Medium / Bold),
     not by font-family variation. Cleaner, more disciplined, easier to maintain. */
  --f-display: '文源宋体', '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: '文源宋体', 'WenYuan SerifSC', 'Source Han Serif SC', 'Noto Serif SC', serif;
}
html[lang="zh"] body { line-height: 1.95; }

/* Chinese weight hierarchy (all 文源宋体):
   H1 / threshold = Light (300) — elegant & airy at huge sizes
   H2             = Regular (400) — section titles
   H3             = Medium (500) — card and sub-section titles
   Body           = Regular (400)
   Emphasis       = Medium (500)  */
html[lang="zh"] h1 { font-weight: 300; letter-spacing: 0.12em; }
html[lang="zh"] h2 { font-weight: 400; letter-spacing: 0.12em; }
html[lang="zh"] h3 { font-weight: 500; letter-spacing: 0.10em; }
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; }

/* Calm the logomark in Chinese mode — stillness signals confidence */
html[lang="zh"] .threshold-mark {
  animation: threshold-rotate 720s linear infinite;
  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); }

