/* ═══════════════════════════════════════════════════════════════════════════
   Fujian Xingwanxiang Group — Corporate Website
   Design system mirrors the printed corporate handbook:
   deep navy #0A2540 + antique gold #C9A961 + slate / ink / off-white
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --deep-blue: #0A2540;
  --deep-blue-2: #112D52;
  --gold: #C9A961;
  --gold-light: #E5C687;
  --gold-pale: #F0E2BD;
  --slate: #5A6675;
  --ink: #1A2332;
  --bg-gray: #F5F5F0;
  --bg-soft: #FAFAF7;
  --white: #FFFFFF;
  --border-soft: rgba(10, 37, 64, 0.08);

  --font-latin: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", system-ui, sans-serif;
  --font-cjk: "Noto Sans SC", "Hiragino Sans GB", "PingFang SC", "Source Han Sans SC", var(--font-latin);
  --font-arabic: "Noto Sans Arabic", "Geeza Pro", var(--font-latin);

  --container-w: 1180px;
  --section-pad-y: clamp(70px, 9vw, 120px);
  --radius: 4px;
}

/* ── Lang-specific font swaps ────────────────────────────────────────────── */
html[lang="zh"] body, html[lang="zh"] .brand-name { font-family: var(--font-cjk); }
html[lang="ar"] body { font-family: var(--font-arabic); }
html[dir="rtl"] { text-align: right; }
html[dir="rtl"] .nav-menu { flex-direction: row-reverse; }
html[dir="rtl"] .hero-cta { justify-content: flex-end; }

/* ── Reset / base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-latin);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
img { max-width: 100%; display: block; }
a { color: var(--deep-blue); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold); }
ul { list-style: none; padding: 0; margin: 0; }

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 28px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════════════════════════════ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 32px;
  background: rgba(10, 37, 64, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201, 169, 97, 0.18);
}

.brand {
  display: flex; align-items: center; gap: 12px;
  color: var(--white) !important;
  font-weight: 600;
  letter-spacing: 0.08em;
  font-size: 13px;
}
.brand img { width: 32px; height: 32px; }
.brand-name { white-space: nowrap; }

.nav-menu {
  display: flex; gap: 32px; align-items: center;
}
.nav-menu a {
  color: rgba(255, 255, 255, 0.78) !important;
  font-size: 13.5px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.nav-menu a:hover { color: var(--gold) !important; }

.lang-switch { position: relative; }
.lang-btn {
  background: transparent;
  border: 1px solid rgba(201, 169, 97, 0.4);
  color: var(--gold-light);
  padding: 6px 14px;
  border-radius: 2px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.04em;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.2s;
}
.lang-btn:hover { background: rgba(201, 169, 97, 0.1); border-color: var(--gold); }
.caret { font-size: 10px; transition: transform 0.2s; }
.lang-switch.open .caret { transform: rotate(180deg); }

.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: rgba(10, 37, 64, 0.97);
  border: 1px solid rgba(201, 169, 97, 0.3);
  border-radius: 2px;
  min-width: 140px;
  padding: 6px 0;
  opacity: 0; visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
html[dir="rtl"] .lang-menu { right: auto; left: 0; }
.lang-switch.open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-menu li {
  padding: 9px 18px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13.5px;
  letter-spacing: 0.02em;
  transition: background 0.15s, color 0.15s;
}
.lang-menu li:hover { background: rgba(201, 169, 97, 0.12); color: var(--gold-light); }
.lang-menu li.active { color: var(--gold); }

.nav-toggle {
  display: none;
  background: transparent; border: 0; color: var(--gold);
  font-size: 28px; cursor: pointer; padding: 0 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  height: 100vh; min-height: 620px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  color: var(--white);
  text-align: center;
}
.hero-bg {
  position: absolute; inset: 0;
  background: url("assets/hero.png") center/cover no-repeat;
  filter: brightness(0.55);
}
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,37,64,0.35) 0%, rgba(10,37,64,0.55) 60%, rgba(10,37,64,0.92) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 900px; padding: 0 24px;
}
.hero-eyebrow {
  font-size: 13px;
  letter-spacing: 0.4em;
  color: var(--gold);
  text-transform: uppercase;
  margin: 0 0 24px 0;
  font-weight: 500;
}
.hero-title {
  font-size: clamp(34px, 5vw, 60px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.02em;
  margin: 0 0 22px 0;
}
.hero-title span { display: block; }
.hero-line-1 { color: var(--white); }
.hero-line-2 { color: var(--gold-light); font-size: 0.62em; letter-spacing: 0.15em; margin-top: 12px; font-weight: 500; }
.hero-tagline {
  font-size: clamp(15px, 1.6vw, 19px);
  color: rgba(255, 255, 255, 0.86);
  letter-spacing: 0.1em;
  margin: 0 auto 36px;
  max-width: 700px;
}
.hero-cta {
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
}
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-weight: 500;
  letter-spacing: 0.08em;
  font-size: 13.5px;
  border-radius: 2px;
  transition: all 0.25s;
  text-transform: uppercase;
  border: 1.5px solid transparent;
}
.btn-gold { background: var(--gold); color: var(--deep-blue) !important; }
.btn-gold:hover { background: var(--gold-light); color: var(--deep-blue) !important; }
.btn-outline { border-color: var(--gold-light); color: var(--gold-light) !important; }
.btn-outline:hover { background: var(--gold); color: var(--deep-blue) !important; border-color: var(--gold); }

.hero-scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  font-size: 11px; letter-spacing: 0.3em; color: rgba(255, 255, 255, 0.55);
  z-index: 2;
  animation: pulse 2.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: translateX(-50%) translateY(0); }
  50% { opacity: 0.9; transform: translateX(-50%) translateY(6px); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECTIONS
   ═══════════════════════════════════════════════════════════════════════════ */
.section {
  padding: var(--section-pad-y) 0;
  position: relative;
}
.section-alt { background: var(--bg-soft); }
.section-dark { background: var(--deep-blue); color: var(--white); }
.section-dark .section-title { color: var(--white); }
.section-dark .section-intro,
.section-dark p { color: rgba(255, 255, 255, 0.84); }

.section-eyebrow {
  font-size: 11.5px;
  letter-spacing: 0.4em;
  color: var(--gold);
  font-weight: 600;
  text-transform: uppercase;
  margin: 0 0 18px 0;
}
.section-title {
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 700;
  color: var(--deep-blue);
  letter-spacing: -0.005em;
  line-height: 1.2;
  margin: 0;
}
.section-rule {
  width: 56px; height: 3px; background: var(--gold);
  margin: 22px 0 38px 0;
}
html[dir="rtl"] .section-rule { margin-left: auto; margin-right: 0; }
.section-intro {
  font-size: 17px;
  color: var(--slate);
  max-width: 880px;
  line-height: 1.75;
  margin: 0 0 50px 0;
}
.section-dark .section-intro { color: rgba(255, 255, 255, 0.78); }

/* ── ABOUT ──────────────────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(440px, 1.4fr);
  gap: 64px;
  align-items: start;
}
.about-text p {
  font-size: 16px;
  line-height: 1.8;
  margin: 0 0 18px 0;
  color: var(--ink);
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.kpi {
  background: var(--bg-soft);
  padding: 18px 16px;
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
}
html[dir="rtl"] .kpi { border-left: 0; border-right: 3px solid var(--gold); border-radius: var(--radius) 0 0 var(--radius); }
.kpi-value {
  font-size: 22px; font-weight: 700; color: var(--deep-blue);
  display: block; line-height: 1.2; margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.kpi-label {
  font-size: 12px; color: var(--slate);
  letter-spacing: 0.03em; line-height: 1.4;
}

/* ── PILLARS ─────────────────────────────────────────────────────────────── */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.pillar {
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex; flex-direction: column;
}
.pillar:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(10, 37, 64, 0.08);
}
.pillar-image {
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.pillar-image::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,37,64,0) 0%, rgba(10,37,64,0.4) 100%);
}
.pillar-num {
  position: absolute; top: 16px; left: 20px;
  color: var(--gold); font-size: 13px; letter-spacing: 0.3em;
  font-weight: 600; z-index: 2;
}
.pillar-body {
  padding: 28px 26px 30px 26px;
  flex: 1;
  display: flex; flex-direction: column;
}
.pillar-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--deep-blue);
  margin: 0 0 4px 0;
  line-height: 1.25;
}
.pillar-subtitle {
  font-size: 12.5px;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  margin: 0 0 16px 0;
}
.pillar-tagline {
  font-size: 14.5px;
  color: var(--slate);
  margin: 0 0 22px 0;
  line-height: 1.5;
}
.pillar-bullets li {
  font-size: 14.5px;
  padding: 9px 0 9px 22px;
  border-bottom: 1px solid var(--border-soft);
  position: relative;
  color: var(--ink);
  line-height: 1.5;
}
html[dir="rtl"] .pillar-bullets li { padding: 9px 22px 9px 0; }
.pillar-bullets li:last-child { border-bottom: 0; }
.pillar-bullets li::before {
  content: ""; position: absolute; left: 0; top: 18px;
  width: 8px; height: 8px; background: var(--gold);
  border-radius: 1px;
}
html[dir="rtl"] .pillar-bullets li::before { left: auto; right: 0; }

/* ── TECH ────────────────────────────────────────────────────────────────── */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.tech-card {
  background: var(--white);
  padding: 32px 28px;
  border-top: 3px solid var(--gold);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 2px 12px rgba(10, 37, 64, 0.04);
}
.tech-card h3 {
  font-size: 19px;
  margin: 0 0 14px 0;
  color: var(--deep-blue);
  font-weight: 700;
}
.tech-card p {
  font-size: 14.5px;
  color: var(--ink);
  line-height: 1.7;
  margin: 0 0 14px 0;
}
.tech-card ul li {
  font-size: 13.5px;
  color: var(--slate);
  padding: 5px 0 5px 14px;
  position: relative;
}
.tech-card ul li::before {
  content: "·"; color: var(--gold);
  position: absolute; left: 0; top: 5px;
  font-weight: 700; font-size: 18px;
}
html[dir="rtl"] .tech-card ul li { padding: 5px 14px 5px 0; }
html[dir="rtl"] .tech-card ul li::before { left: auto; right: 0; }

/* ── GLOBAL (dark) ───────────────────────────────────────────────────────── */
.regions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px 36px;
  margin-top: 12px;
}
.region {
  padding: 24px 26px;
  background: rgba(255, 255, 255, 0.04);
  border-left: 2px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
}
html[dir="rtl"] .region { border-left: 0; border-right: 2px solid var(--gold); border-radius: var(--radius) 0 0 var(--radius); }
.region-name {
  color: var(--gold-light);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 8px 0;
  font-weight: 600;
}
.region-countries {
  color: rgba(255, 255, 255, 0.88) !important;
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
}

/* ── CULTURE ─────────────────────────────────────────────────────────────── */
.vision {
  background: var(--bg-soft);
  border-left: 5px solid var(--gold);
  padding: 38px 44px;
  margin: 0 0 50px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}
html[dir="rtl"] .vision { border-left: 0; border-right: 5px solid var(--gold); border-radius: var(--radius) 0 0 var(--radius); }
.vision-text {
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 600;
  color: var(--deep-blue);
  margin: 0 0 14px 0;
  line-height: 1.5;
  letter-spacing: 0.02em;
}
.vision-attr {
  font-size: 13.5px;
  color: var(--slate);
  letter-spacing: 0.04em;
}
.values-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 50px;
}
.value-item {
  padding-left: 22px;
  border-left: 1px solid var(--border-soft);
}
html[dir="rtl"] .value-item { padding-left: 0; padding-right: 22px; border-left: 0; border-right: 1px solid var(--border-soft); }
.value-name {
  font-size: 12.5px;
  color: var(--gold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0 0 8px 0;
  font-weight: 600;
}
.value-body {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.75;
  margin: 0;
}

/* ── FOOTER / CONTACT ────────────────────────────────────────────────────── */
.site-footer {
  background: var(--deep-blue);
  color: var(--white);
  padding: var(--section-pad-y) 0 40px 0;
}
.site-footer .section-title { color: var(--white); }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px 64px;
  margin-bottom: 60px;
}
.contact-label {
  font-size: 11.5px;
  color: var(--gold);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  margin: 0 0 10px 0;
  font-weight: 600;
}
.contact-value {
  font-size: 17px;
  color: var(--white);
  margin: 0;
  line-height: 1.5;
}
.contact-value-large { font-size: 20px; font-weight: 600; letter-spacing: 0.02em; }
.contact-value a { color: var(--gold-light) !important; }
.contact-value a:hover { color: var(--white) !important; }

.footer-bottom {
  border-top: 1px solid rgba(201, 169, 97, 0.2);
  padding-top: 28px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.footer-tag {
  color: var(--gold-light); margin: 0;
  font-size: 12px; letter-spacing: 0.24em;
}
.footer-copy {
  color: rgba(255, 255, 255, 0.5); margin: 0;
  font-size: 12.5px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 980px) {
  .nav-toggle { display: inline-block; order: 2; }
  .nav-menu {
    position: fixed; top: 60px; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    gap: 0;
    background: rgba(10, 37, 64, 0.98);
    padding: 12px 0;
    border-bottom: 1px solid rgba(201, 169, 97, 0.2);
    transform: translateY(-12px);
    opacity: 0; visibility: hidden;
    transition: all 0.25s;
  }
  .nav-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav-menu a { display: block; padding: 12px 32px; }
  .brand-name { font-size: 12px; }
  .topbar { padding: 12px 20px; }

  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .pillar-grid, .tech-grid, .contact-grid, .regions-grid, .values-grid {
    grid-template-columns: 1fr;
  }
  .vision { padding: 28px 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .hero { min-height: 540px; }
  .brand-name { display: none; }
}
