/*
Theme Name: CNBD Legal
Theme URI: https://www.cnbdlegalcounsel.com
Author: CNBD International Legal Counsel
Description: Bilingual (English / 中文) law-firm theme for CNBD International Legal Counsel — investment, immigration, litigation and arbitration.
Version: 1.0.4
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: cnbd
*/

:root {
	--ink: #0e1622;
	--ink-2: #172234;
	--gold: #c9a24a;
	--gold-light: #e6c97a;
	--gold-pale: #f6eedb;
	--red: #b4161b;
	--green: #0d6b3d;
	--text: #2a2f38;
	--muted: #6b7280;
	--line: #e5e0d4;
	--bg: #ffffff;
	--cream: #faf6ee;
	--radius: 10px;
	--serif: "Cormorant Garamond", "Noto Serif SC", Georgia, serif;
	--sans: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font-family: var(--sans); font-size: 16px; line-height: 1.65; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); line-height: 1.15; margin: 0 0 .5em; font-weight: 700; }
h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* Language switching */
html[data-lang="en"] .zh { display: none !important; }
html[data-lang="zh"] .en { display: none !important; }
html[data-lang="zh"] h1, html[data-lang="zh"] h2, html[data-lang="zh"] h3 { font-family: "Noto Serif SC", var(--serif); letter-spacing: .02em; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .85em 1.6em; border-radius: 4px; font-weight: 600; font-size: .95rem; letter-spacing: .02em; border: 2px solid transparent; cursor: pointer; transition: all .2s ease; font-family: var(--sans); }
.btn-gold { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--ink); }
.btn-gold:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(201,162,74,.35); }
.btn-outline { border-color: var(--gold); color: var(--gold-light); }
.btn-outline:hover { background: var(--gold); color: var(--ink); }
.btn-light { background: #fff; color: var(--red); }
.btn-light:hover { background: var(--gold-pale); }
.btn-outline-light { border-color: #fff; color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--red); }
.btn-block { width: 100%; }

/* ---------- Top bar & header ---------- */
.topbar { background: var(--ink); color: #c9ced8; font-size: .82rem; border-bottom: 1px solid rgba(201,162,74,.2); }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; min-height: 38px; gap: 12px; }
.topbar-contact { display: flex; gap: 20px; flex-wrap: wrap; }
.topbar a:hover { color: var(--gold-light); }
.lang-toggle { background: transparent; border: 1px solid var(--gold); color: var(--gold-light); padding: 3px 12px; border-radius: 20px; font-size: .8rem; cursor: pointer; font-family: var(--sans); }
.lang-toggle:hover { background: var(--gold); color: var(--ink); }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(14,22,34,.97); backdrop-filter: blur(8px); transition: box-shadow .2s; }
.site-header.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,.25); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 78px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { border-radius: 50%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--serif); font-size: 1.7rem; color: #fff; letter-spacing: .08em; }
.brand-text small { color: var(--gold-light); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.nav-list { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; }
.nav-list a { color: #e8eaee; font-size: .92rem; font-weight: 500; position: relative; padding: 6px 0; }
.nav-list a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--gold); transition: width .2s; }
.nav-list a:hover { color: var(--gold-light); }
.nav-list a:hover::after { width: 100%; }
.nav-cta { padding: .6em 1.2em; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--gold-light); margin: 5px 0; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--ink); color: #dfe3ea; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background:
	radial-gradient(ellipse at 80% 20%, rgba(201,162,74,.18), transparent 55%),
	radial-gradient(ellipse at 10% 90%, rgba(13,107,61,.25), transparent 50%),
	linear-gradient(160deg, #0e1622 0%, #172234 60%, #0e1622 100%); }
.hero-bg::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(201,162,74,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(201,162,74,.05) 1px, transparent 1px); background-size: 60px 60px; mask-image: linear-gradient(to bottom, transparent, #000 40%, transparent); }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.35fr 1fr; gap: 60px; align-items: center; padding: 110px 20px 120px; }
.eyebrow { text-transform: uppercase; letter-spacing: .2em; font-size: .78rem; font-weight: 600; color: var(--gold); margin-bottom: 1em; }
.hero h1 { color: #fff; font-size: clamp(2.4rem, 5.2vw, 4rem); margin-bottom: .4em; }
.hero h1 em { font-style: normal; color: var(--gold-light); }
.lead { font-size: 1.15rem; max-width: 560px; color: #c3c9d3; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin: 32px 0 36px; }
.hero-badges { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-badges li { border: 1px solid rgba(201,162,74,.35); padding: 6px 14px; border-radius: 20px; font-size: .82rem; color: var(--gold-pale); background: rgba(201,162,74,.06); }
.hero-card { justify-self: center; width: 100%; max-width: 380px; aspect-ratio: 4/5; border-radius: 16px; background: linear-gradient(145deg, #e9cf86, #c9a24a 45%, #a9822f); box-shadow: 0 30px 60px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.4); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 32px; padding: 32px; position: relative; }
.hero-card::before { content: ""; position: absolute; left: 0; right: 0; top: 62%; height: 10px; background: repeating-linear-gradient(-45deg, var(--red) 0 6px, #d8323a 6px 9px); opacity: .9; }
.hero-card img { width: 150px; height: 150px; border-radius: 50%; box-shadow: 0 10px 25px rgba(0,0,0,.25); }
.hero-card-pillars { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; margin-top: 30px; font-family: var(--serif); font-weight: 700; font-size: 1.25rem; color: var(--red); text-align: center; }
.hero-stripe { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: linear-gradient(90deg, var(--green) 0 33%, var(--gold) 33% 66%, var(--red) 66%); }

/* ---------- Sections ---------- */
.section { padding: 100px 0; }
.section-dark { background: var(--ink-2); color: #cfd4dc; }
.section-dark h2 { color: #fff; }
.section-cream { background: var(--cream); }
.section-head { text-align: center; max-width: 700px; margin: 0 auto 56px; }
.section-sub { color: var(--muted); font-size: 1.05rem; }

/* Practice */
.practice-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.practice-card { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: var(--radius); padding: 32px 26px; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.practice-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(14,22,34,.12); border-top-color: var(--red); }
.practice-card p { color: var(--muted); font-size: .95rem; flex: 1; }
.practice-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--gold-pale); display: grid; place-items: center; margin-bottom: 20px; }
.practice-icon svg { width: 28px; height: 28px; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card-link { color: var(--red); font-weight: 600; font-size: .9rem; }
.card-link:hover { color: var(--ink); }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 70px; align-items: center; }
.founder-photo { position: relative; }
.founder-photo::before { content: ""; position: absolute; inset: 20px -20px -20px 20px; border: 2px solid var(--gold); border-radius: var(--radius); }
.founder-photo img, .founder-placeholder { position: relative; border-radius: var(--radius); aspect-ratio: 4/5; width: 100%; object-fit: cover; }
.founder-placeholder { display: grid; place-items: center; background: linear-gradient(145deg, #23314a, #0e1622); color: var(--gold); font-family: var(--serif); font-size: 6rem; letter-spacing: .1em; }
.role { color: var(--gold-light); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; }
.credentials { list-style: none; padding: 0; margin: 24px 0 32px; }
.credentials li { padding: 12px 0 12px 32px; border-bottom: 1px solid rgba(255,255,255,.08); position: relative; color: #e5e8ee; }
.credentials li::before { content: "§"; position: absolute; left: 0; color: var(--gold); font-family: var(--serif); font-size: 1.3rem; top: 7px; }

/* Why */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.why-item { padding-top: 20px; border-top: 1px solid var(--line); }
.why-num { font-family: var(--serif); font-size: 2.6rem; color: var(--gold); font-weight: 700; line-height: 1; display: block; margin-bottom: 12px; }
.why-item h3 { font-size: 1.35rem; }
.why-item p { color: var(--muted); font-size: .95rem; }

/* Process */
.process { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; }
.process::before { content: ""; position: absolute; top: 28px; left: 12%; right: 12%; height: 2px; background: repeating-linear-gradient(90deg, var(--gold) 0 8px, transparent 8px 14px); }
.process li { counter-increment: step; text-align: center; position: relative; }
.process li::before { content: counter(step); display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 50%; background: var(--ink); color: var(--gold-light); font-family: var(--serif); font-size: 1.5rem; font-weight: 700; border: 3px solid var(--cream); box-shadow: 0 0 0 2px var(--gold); position: relative; }
.process strong { font-family: var(--serif); font-size: 1.35rem; color: var(--ink); display: block; margin-bottom: 6px; }
.process p { color: var(--muted); font-size: .93rem; }

/* CTA */
.cta-band { background: linear-gradient(120deg, var(--red), #8e1015); color: #fff; padding: 56px 0; }
.cta-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 60px; align-items: start; }
.contact-list { display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; margin: 28px 0; }
.contact-list dt { font-weight: 600; color: var(--ink); }
.contact-list dd { margin: 0; color: var(--muted); }
.contact-list a { color: var(--red); }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.map iframe { width: 100%; height: 240px; border: 0; display: block; }
.contact-form { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; display: grid; gap: 16px; box-shadow: 0 20px 40px rgba(14,22,34,.06); }
.contact-form label { display: grid; gap: 6px; font-size: .88rem; font-weight: 600; color: var(--ink); }
.contact-form input, .contact-form select, .contact-form textarea { font: inherit; font-weight: 400; padding: 12px 14px; border: 1px solid #d6cfbd; border-radius: 6px; background: #fff; color: var(--text); width: 100%; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,74,.2); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-note { font-size: .8rem; color: var(--muted); margin: 0; }
.form-notice { padding: 12px 16px; border-radius: 6px; font-size: .92rem; }
.form-notice.ok { background: #e3f3ea; color: var(--green); }
.form-notice.err { background: #fbe5e5; color: var(--red); }
.hp { position: absolute; left: -9999px; }

/* Footer */
.site-footer { background: var(--ink); color: #aeb5c1; padding: 70px 0 0; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr 1.2fr; gap: 40px; padding-bottom: 50px; }
.site-footer h4 { color: var(--gold-light); font-family: var(--sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .16em; margin-bottom: 18px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a:hover { color: var(--gold-light); }
.brand-footer { margin-bottom: 18px; }
.muted { color: #8d95a3; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 24px 20px 30px; font-size: .8rem; }
.footer-bottom p { margin: 0 0 6px; }
.disclaimer { color: #6f7785; }

/* WhatsApp */
.whatsapp-float { position: fixed; right: 20px; bottom: 20px; width: 56px; height: 56px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 8px 20px rgba(0,0,0,.25); z-index: 60; transition: transform .2s; }
.whatsapp-float:hover { transform: scale(1.08); }

/* Inner pages */
.page-hero { background: var(--ink); padding: 70px 0; border-bottom: 6px solid var(--gold); }
.page-hero h1 { color: #fff; margin: 0; font-size: clamp(2rem, 4vw, 3rem); }
.content { max-width: 820px; }
.entry { padding: 24px 0; border-bottom: 1px solid var(--line); }
.entry-meta { color: var(--muted); font-size: .85rem; margin-bottom: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.practice-grid, .why-grid { grid-template-columns: repeat(2, 1fr); }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.site-nav { gap: 18px; }
	.nav-list { gap: 18px; }
}
@media (max-width: 900px) {
	.nav-toggle { display: block; }
	.site-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--ink); flex-direction: column; align-items: stretch; padding: 10px 20px 24px; gap: 12px; display: none; border-top: 1px solid rgba(201,162,74,.2); }
	.site-nav.open { display: flex; }
	.nav-list { flex-direction: column; gap: 0; }
	.nav-list a { display: block; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
	.hero-inner, .about-grid, .contact-grid { grid-template-columns: 1fr; }
	.hero-inner { padding: 70px 20px 80px; gap: 40px; }
	.hero-card { max-width: 300px; }
	.founder-photo { max-width: 380px; }
	.process { grid-template-columns: 1fr 1fr; row-gap: 40px; }
	.process::before { display: none; }
	.section { padding: 72px 0; }
}
@media (max-width: 560px) {
	.container { padding: 0 16px; }
	.practice-grid, .why-grid, .form-row, .footer-grid { grid-template-columns: 1fr; }
	.process { grid-template-columns: 1fr; }
	.hide-sm { display: none; }
	.topbar-contact { gap: 12px; font-size: .76rem; }
	.hero-inner { padding: 56px 16px 64px; }
	html[data-lang="zh"] .hero h1 { font-size: 2.1rem; }
	.brand-text strong { font-size: 1.4rem; }
	.brand-text small { font-size: .62rem; }
	.contact-form { padding: 24px 18px; }
	.cta-inner { flex-direction: column; align-items: flex-start; }
}

/* Founder photo framing */
.founder-photo img { object-position: center 20%; }

/* WeChat QR in footer */
.footer-wechat { display: flex; align-items: center; gap: 24px; padding-bottom: 40px; margin-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-wechat img { width: 140px; height: auto; border-radius: 10px; background: #fff; padding: 8px; flex-shrink: 0; }
.footer-wechat h4 { margin-bottom: 8px; }
.footer-wechat p { margin: 0 0 6px; color: #c9ced8; }
@media (max-width: 560px) { .footer-wechat { flex-direction: column; text-align: center; } }

/* Logo: transparent shape, no circle crop or ring */
.brand img, .hero-card img { border-radius: 0; background: none; box-shadow: none; object-fit: contain; }
.hero-card img { width: 170px; height: 170px; filter: drop-shadow(0 10px 18px rgba(0,0,0,.3)); }
