/* MINGXI Overseas Showcase - Modern Chinese Heritage Theme */
:root {
  --bg-paper: #faf7f0;
  --bg-card: #ffffff;
  --bg-ink: #181a1f;
  --ink: #1b1d22;
  --ink-muted: #5a5e66;
  --red: #a62c2b;
  --red-dark: #851f1e;
  --gold: #b8893a;
  --border: #e5dec9;
  --radius: 16px;
  --shadow: 0 14px 36px rgba(24, 26, 31, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: min(1140px, 100% - 32px);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 247, 240, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 66px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand img { height: 34px; width: auto; }
.brand-tag {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  border-left: 1px solid var(--border);
  padding-left: 10px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
}
.nav-links a:hover, .nav-links a.is-active { color: var(--red); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
  border: 1px solid transparent;
  text-align: center;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 8px 16px; font-size: 13px; white-space: nowrap; }
.btn-lg { padding: 13px 24px; font-size: 16px; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-ghost { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.22); }
.btn-outline { padding: 10px 18px; border-color: var(--gold); color: var(--ink); background: #fff; font-size: 14px; }

/* Hero */
.hero {
  position: relative;
  background: var(--bg-ink);
  color: #faf7f0;
  padding: 56px 0 64px;
  overflow: hidden;
}
.hero-backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(20, 22, 27, 0.92), rgba(20, 22, 27, 0.72)), url("brand/hero-bg.webp") center/cover no-repeat;
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}
.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gold);
}
h1, h2, h3 {
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  line-height: 1.2;
  margin: 0 0 14px;
}
.hero h1 { font-size: clamp(30px, 4vw, 46px); }
.hero-lede { color: #e2dac9; font-size: 17px; margin: 0 0 20px; }

.trial-callout {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(184, 137, 58, 0.45);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 22px;
}
.trial-callout p { margin: 0; font-size: 14px; color: #f4efe3; }
.trial-badge {
  background: var(--gold);
  color: #181a1f;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  margin-top: 2px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
  color: #cfc6b2;
}
.trust-row li::before { content: "✓ "; color: var(--gold); font-weight: 700; }

/* Card Flip Component */
.hero-showcase { text-align: center; }
.hero-card-frame, .card-visual {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.35);
  background: #101216;
  margin-inline: auto;
}
.hero-card-frame.is-vertical, .card-visual.is-vertical {
  max-width: 280px;
}
.card-face { width: 100%; display: block; }
.card-back { display: none; }
[data-side="back"] .card-front { display: none; }
[data-side="back"] .card-back { display: block; }

.flip-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(24, 26, 31, 0.85);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.flip-btn:hover { background: var(--red); border-color: var(--red); }
.showcase-caption { margin: 12px 0 0; font-size: 13px; color: #cfc6b2; }
.section-paper .showcase-caption { color: var(--ink-muted); }

/* Sections */
.section { padding: 64px 0; }
.section-paper { background: var(--bg-paper); border-block: 1px solid var(--border); }
.section-head { max-width: 680px; margin-bottom: 32px; }
.section-head h2, .section-head h1 { font-size: clamp(26px, 3.2vw, 36px); }
.section-head p { color: var(--ink-muted); margin: 0; }

/* Comparison */
.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.compare-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.compare-card.is-bad { border-top: 4px solid #999; }
.compare-card.is-good { border-top: 4px solid var(--red); }
.compare-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.is-bad .compare-tag { background: #efefef; color: #555; }
.is-good .compare-tag { background: #fbeaea; color: var(--red); }
.compare-card h3 { font-size: 19px; margin-bottom: 6px; }
.compare-card p { margin: 0; font-size: 14px; color: var(--ink-muted); }
.compare-card hr { border: 0; border-top: 1px dashed var(--border); margin: 16px 0; }

/* Gallery */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.filter-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.filter-btn.is-active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.card-tile {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.card-tile.is-hidden { display: none; }
.card-tile .card-visual {
  border-radius: 0;
  box-shadow: none;
  background: #f4efe3;
  width: 100%;
}
.card-tile .card-visual.is-vertical {
  max-width: none;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.card-tile .card-visual.is-vertical img {
  height: 100%;
  width: auto;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}
.card-meta { padding: 16px; }
.card-meta-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.card-meta h3 { font-size: 17px; margin-bottom: 6px; }
.cn-sub { display: block; font-size: 13px; font-weight: 400; color: var(--ink-muted); font-family: sans-serif; }
.card-cat {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg-paper);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.card-meta p { margin: 0; font-size: 13px; color: var(--ink-muted); }

/* Name Chips & Directory */
.search-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.search-wrap input[type="search"] {
  flex: 1 1 280px;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid #cbbd99;
  font-size: 15px;
  background: #fff;
}
.name-chip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.name-chip {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.name-chip:hover { border-color: var(--red); }
.name-chip.is-hidden { display: none; }
.name-chip strong { font-size: 16px; }
.name-chip span { font-size: 13px; color: var(--ink-muted); }

.dir-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.dir-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}
.dir-card:hover { border-color: var(--red); }
.dir-card.is-hidden { display: none; }
.dir-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.dir-top h3 { margin: 0; font-size: 20px; }
.gender-pill { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--bg-paper); border: 1px solid var(--border); }
.dir-bad { margin: 0 0 6px; font-size: 13px; color: #7a7f87; }
.dir-good { margin: 0; font-size: 14px; color: var(--red); }

/* Pricing & Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.step-box {
  background: var(--bg-paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.step-num {
  display: inline-block;
  font-weight: 800;
  color: var(--red);
  font-size: 14px;
  margin-bottom: 8px;
}
.step-box h3 { font-size: 20px; }
.step-box p { margin: 0; font-size: 14px; color: var(--ink-muted); }
.center-cta { text-align: center; }
.tiny-note { margin: 10px 0 0; font-size: 13px; color: var(--ink-muted); }

/* Individual Name Page */
.breadcrumb { font-size: 13px; color: var(--ink-muted); margin-bottom: 20px; }
.breadcrumb a:hover { color: var(--red); }
.name-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 32px;
  align-items: center;
}
.bad-box {
  background: #fff;
  border: 1px solid #e3c9c9;
  border-left: 4px solid var(--red);
  border-radius: 12px;
  padding: 14px 16px;
}
.bad-box strong { display: block; margin-bottom: 4px; color: var(--red); }
.bad-box p { margin: 0; font-size: 14px; color: var(--ink-muted); }
.section-paper .hero-lede { color: var(--ink-muted); }

.picks-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.pick-card {
  background: var(--bg-paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.pick-style {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-bottom: 8px;
}
.pick-hanzi { font-size: 32px; font-weight: 700; line-height: 1.2; color: var(--ink); }
.pick-pinyin { font-size: 15px; font-weight: 600; color: var(--red); margin-bottom: 10px; }
.pick-card p { margin: 0; font-size: 14px; color: var(--ink-muted); }

.cta-banner {
  background: var(--bg-ink);
  color: #faf7f0;
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.cta-banner h3 { margin-bottom: 6px; font-size: 22px; }
.cta-banner p { margin: 0; color: #ddd4c1; max-width: 640px; font-size: 14px; }
.sub-heading { font-size: 24px; margin-bottom: 18px; }

/* FAQ */
.faq-wrap { max-width: 780px; }
.faq-wrap details {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
}
.faq-wrap summary { font-weight: 700; cursor: pointer; }
.faq-wrap details p { margin: 10px 0 0; font-size: 14px; color: var(--ink-muted); }

/* Footer */
.site-footer {
  background: var(--bg-ink);
  color: #cfc6b2;
  padding: 36px 0;
  font-size: 14px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-brand { font-family: Georgia, serif; font-size: 18px; color: #fff; font-weight: 700; margin-bottom: 4px; }
.footer-note { margin: 0; max-width: 500px; font-size: 13px; }
.footer-links { display: flex; gap: 18px; }
.footer-links a:hover { color: #fff; }

@media (max-width: 900px) {
  .hero-grid, .name-hero-grid, .compare-grid, .card-grid, .steps-grid, .picks-grid, .dir-grid, .name-chip-grid {
    grid-template-columns: 1fr;
  }
  .nav-links, .brand-tag { display: none; }
}
