/* ==========================================================================
   LPFM Consultancy — stylesheet
   Palette: Ink Navy / Cream / Brass Gold / Jade
   ========================================================================== */

:root {
  --ink: #0C1B2A;
  --ink-soft: #16293D;
  --cream: #F7F4EE;
  --cream-dim: #EFEAE0;
  --stone: #6B7280;
  --gold: #B98B45;
  --gold-light: #D9B679;
  --jade: #2F5D50;
  --jade-light: #3E7A69;
  --white: #FFFFFF;

  --font-display: "IBM Plex Sans", "Noto Sans SC", sans-serif;
  --font-body: "Inter", "Noto Sans SC", sans-serif;

  --container-w: 1180px;
  --radius: 14px;
  --ease: cubic-bezier(.16,.84,.44,1);
}

/* -------------------------------------------------------------------------
   Reset & base
   ------------------------------------------------------------------------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }

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

/* -------------------------------------------------------------------------
   Language toggle logic
   ------------------------------------------------------------------------- */
body.lang-en .cn { display: none; }
body.lang-cn .en { display: none; }

/* default inline-level for lang spans inside flowing text / tags */
.cn, .en { }

/* block-level contexts need the spans to behave as blocks */
h1 .cn, h1 .en,
h2 .cn, h2 .en,
h3 .cn, h3 .en,
p > .cn, p > .en,
.hero-lede > .cn, .hero-lede > .en,
.section-lede > .cn, .section-lede > .en,
.case-brief > .cn, .case-brief > .en {
  display: block;
}
body.lang-en h1 .en, body.lang-en h2 .en, body.lang-en h3 .en,
body.lang-en p > .en, body.lang-en .hero-lede > .en, body.lang-en .section-lede > .en, body.lang-en .case-brief > .en { display: block; }
body.lang-cn h1 .cn, body.lang-cn h2 .cn, body.lang-cn h3 .cn,
body.lang-cn p > .cn, body.lang-cn .hero-lede > .cn, body.lang-cn .section-lede > .cn, body.lang-cn .case-brief > .cn { display: block; }

/* -------------------------------------------------------------------------
   Progress bar
   ------------------------------------------------------------------------- */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--jade));
  z-index: 999;
  transition: width 0.1s linear;
}

/* -------------------------------------------------------------------------
   Header
   ------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(247, 244, 238, 0);
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.scrolled {
  background: rgba(247, 244, 238, 0.92);
  backdrop-filter: blur(10px);
  border-bottom-color: rgba(12,27,42,0.08);
  box-shadow: 0 8px 24px rgba(12,27,42,0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-shrink: 0;
}
.brand-mark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--cream);
  transition: color .3s var(--ease);
}
.brand-mark-accent { color: var(--gold-light); transition: color .3s var(--ease); }
.brand-sub {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(247,244,238,0.65);
  transition: color .3s var(--ease);
}

/* Scrolled state: header bg is now light cream, so switch to dark ink text */
.site-header.scrolled .brand-mark { color: var(--ink); }
.site-header.scrolled .brand-mark-accent { color: var(--gold); }
.site-header.scrolled .brand-sub { color: var(--stone); }

.main-nav {
  display: flex;
  gap: 32px;
  flex: 1;
  justify-content: center;
}
.main-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(247,244,238,0.88);
  position: relative;
  padding: 4px 0;
  transition: color .2s;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--gold-light);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s var(--ease);
}
.main-nav a:hover { color: var(--gold-light); }
.main-nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.site-header.scrolled .main-nav a { color: var(--ink-soft); }
.site-header.scrolled .main-nav a::after { background: var(--gold); }
.site-header.scrolled .main-nav a:hover { color: var(--ink); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid rgba(247,244,238,0.35);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  cursor: pointer;
  color: rgba(247,244,238,0.65);
  transition: border-color .3s, color .3s;
}
.lang-opt { transition: color .2s, font-weight .2s; }
.lang-opt.is-active { color: var(--cream); font-weight: 700; }
.lang-div { color: rgba(247,244,238,0.35); }

.site-header.scrolled .lang-toggle { border-color: rgba(12,27,42,0.15); color: var(--stone); }
.site-header.scrolled .lang-opt.is-active { color: var(--ink); }
.site-header.scrolled .lang-div { color: rgba(12,27,42,0.25); }

/* Header CTA button reads as a gold pill over the dark hero, ink pill once scrolled */
.site-header .btn-primary.btn-small { background: var(--gold); color: var(--ink); box-shadow: none; }
.site-header .btn-primary.btn-small:hover { background: var(--gold-light); }
.site-header.scrolled .btn-primary.btn-small { background: var(--ink); color: var(--cream); }
.site-header.scrolled .btn-primary.btn-small:hover { background: var(--jade); }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.menu-toggle span {
  width: 22px; height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .3s, background .3s;
}
.site-header.scrolled .menu-toggle span { background: var(--ink); }

/* -------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
  white-space: nowrap;
}
.btn span { display: inline; }
.btn-primary {
  background: var(--ink);
  color: var(--cream);
  box-shadow: 0 8px 24px rgba(12,27,42,0.18);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(12,27,42,0.26); background: var(--jade); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid rgba(12,27,42,0.25);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
.btn-small { padding: 10px 20px; font-size: 0.85rem; }
.btn-large { padding: 18px 40px; font-size: 1rem; }

/* -------------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-soft) 100%);
  color: var(--cream);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.9;
}
.hero-bg svg { width: 100%; height: 100%; }

.hero-inner { position: relative; z-index: 2; max-width: 760px; padding-top: 40px; padding-bottom: 90px; }

.eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 22px;
  font-weight: 600;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  color: var(--white);
  margin-bottom: 26px;
}

.hero-lede {
  font-size: 1.1rem;
  color: rgba(247,244,238,0.82);
  max-width: 620px;
  margin-bottom: 40px;
}

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }
.hero .btn-ghost { color: var(--cream); border-color: rgba(247,244,238,0.35); }
.hero .btn-ghost:hover { border-color: var(--gold); color: var(--gold-light); }
.hero .btn-primary { background: var(--gold); color: var(--ink); }
.hero .btn-primary:hover { background: var(--gold-light); }

/* -------------------------------------------------------------------------
   Stats strip
   ------------------------------------------------------------------------- */
.stats-strip {
  background: var(--ink-soft);
  color: var(--cream);
  padding: 56px 0;
  border-bottom: 1px solid rgba(247,244,238,0.08);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.stat { text-align: center; }
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 10px;
}
.stat-num small { font-size: 1.4rem; }
.stat-label { font-size: 0.85rem; color: rgba(247,244,238,0.75); line-height: 1.4; display: block; }

/* -------------------------------------------------------------------------
   Sections generic
   ------------------------------------------------------------------------- */
.section { padding: 110px 0; }
.section-tag {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--jade);
  font-weight: 700;
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  max-width: 760px;
  margin-bottom: 20px;
}
.section-lede {
  font-size: 1.05rem;
  color: var(--stone);
  max-width: 640px;
  margin-bottom: 50px;
}

/* -------------------------------------------------------------------------
   About
   ------------------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 50px;
}
.about-block h3 {
  font-size: 1.3rem;
  margin-bottom: 14px;
  color: var(--ink);
}
.about-block p { color: var(--stone); font-size: 1rem; }

.markets-bar {
  margin-top: 70px;
  padding-top: 40px;
  border-top: 1px solid rgba(12,27,42,0.1);
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.markets-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--stone);
  font-weight: 600;
}
.markets-list {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--ink);
}

/* -------------------------------------------------------------------------
   Services
   ------------------------------------------------------------------------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 34px 30px;
  border: 1px solid rgba(12,27,42,0.06);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(12,27,42,0.08);
}
.service-num {
  display: block;
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 18px;
}
.service-card h3 { font-size: 1.15rem; margin-bottom: 12px; }
.service-card p { color: var(--stone); font-size: 0.95rem; margin-bottom: 18px; }

.tag-row { display: flex; gap: 8px; flex-wrap: wrap; }
.tag-row span {
  font-size: 0.72rem;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--cream-dim);
  color: var(--ink-soft);
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* -------------------------------------------------------------------------
   Approach
   ------------------------------------------------------------------------- */
.approach { background: var(--ink); color: var(--cream); }
.approach .section-tag { color: var(--gold-light); }
.approach .section-title { color: var(--white); }

.approach-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 60px;
  position: relative;
}
.approach-step {
  position: relative;
  padding: 0 24px 0 0;
  border-left: 1px solid rgba(247,244,238,0.15);
  padding-left: 28px;
}
.approach-step:first-child { border-left: none; padding-left: 0; }
.approach-index {
  display: block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--gold-light);
  font-weight: 700;
  margin-bottom: 18px;
}
.approach-step h3 { color: var(--white); font-size: 1.2rem; margin-bottom: 12px; }
.approach-step p { color: rgba(247,244,238,0.72); font-size: 0.92rem; }

/* -------------------------------------------------------------------------
   Case studies
   ------------------------------------------------------------------------- */
.sector-tag {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--jade);
  background: rgba(47,93,80,0.08);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.case-featured {
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-soft) 100%);
  color: var(--cream);
  border-radius: 24px;
  padding: 56px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}
.case-featured::before {
  content: "";
  position: absolute;
  top: -60px; right: -60px;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(185,139,69,0.25), transparent 70%);
}
.case-featured .sector-tag { background: rgba(217,182,121,0.15); color: var(--gold-light); }
.case-featured h3 { font-size: 2.1rem; color: var(--white); margin-bottom: 20px; }
.case-brief { color: rgba(247,244,238,0.82); max-width: 760px; font-size: 1.02rem; margin-bottom: 44px; }

.case-featured-body { position: relative; z-index: 1; }

.case-phases {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-bottom: 44px;
}
.case-phase {
  border-top: 2px solid var(--gold);
  padding-top: 16px;
}
.phase-label {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--gold-light);
  font-size: 1rem;
  margin-bottom: 8px;
}
.case-phase p { font-size: 0.85rem; color: rgba(247,244,238,0.75); }

.case-stats { display: flex; gap: 48px; flex-wrap: wrap; }
.case-stat { display: flex; flex-direction: column; }
.case-stat-num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--white);
}
.case-stat span:last-child { font-size: 0.82rem; color: rgba(247,244,238,0.7); margin-top: 4px; }

.case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.case-card {
  background: var(--white);
  border-radius: 20px;
  padding: 40px;
  border: 1px solid rgba(12,27,42,0.06);
}
.case-card h3 { font-size: 1.5rem; margin-bottom: 16px; }
.case-card p { color: var(--stone); font-size: 0.98rem; margin-bottom: 20px; }
.case-card .tag-row { margin-bottom: 28px; }
.case-card .case-stat-num { color: var(--ink); font-size: 1.5rem; }
.case-card .case-stat span:last-child { color: var(--stone); }

/* -------------------------------------------------------------------------
   Why LPFM
   ------------------------------------------------------------------------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.why-card {
  padding: 30px 0 0;
  border-top: 2px solid var(--jade);
}
.why-card h3 { font-size: 1.05rem; margin-bottom: 12px; }
.why-card p { color: var(--stone); font-size: 0.92rem; }

/* -------------------------------------------------------------------------
   FAQ
   ------------------------------------------------------------------------- */
.faq-list {
  max-width: 820px;
}
.faq-item {
  border-bottom: 1px solid rgba(12,27,42,0.1);
}
.faq-item:first-child {
  border-top: 1px solid rgba(12,27,42,0.1);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid rgba(12,27,42,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--jade);
  transition: transform .3s var(--ease), background .3s, color .3s;
}
.faq-item[open] summary::after {
  content: "\2212";
  background: var(--jade);
  color: var(--white);
  border-color: var(--jade);
}
.faq-item summary:hover::after { border-color: var(--jade); }
.faq-item p {
  color: var(--stone);
  font-size: 0.96rem;
  max-width: 700px;
  padding-bottom: 26px;
}

/* -------------------------------------------------------------------------
   Contact
   ------------------------------------------------------------------------- */
.contact { background: var(--cream-dim); text-align: center; }
.contact-inner { display: flex; flex-direction: column; align-items: center; }
.contact .section-title, .contact .section-lede { margin-left: auto; margin-right: auto; }
.contact-details {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 18px;
}
.contact-link {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 4px;
  transition: color .2s;
}
.contact-link:hover { color: var(--jade); }
.contact-cities { color: var(--stone); margin-bottom: 40px; font-size: 0.95rem; }

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: rgba(247,244,238,0.65);
  padding: 48px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand .brand-mark { color: var(--cream); }
.footer-cities, .footer-copy { font-size: 0.85rem; }

/* -------------------------------------------------------------------------
   Reveal-on-scroll
   ------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .case-phases { grid-template-columns: repeat(3, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .approach-track { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
  .approach-step:nth-child(3) { border-left: none; padding-left: 0; }
}

@media (max-width: 860px) {
  .main-nav { display: none; }
  .menu-toggle { display: flex; }
  .header-inner { height: 70px; }
  .about-grid, .case-grid { grid-template-columns: 1fr; }
  .case-featured { padding: 36px 24px; }
  .case-phases { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .lang-toggle span.lang-full-label { display: none; }
  .section { padding: 80px 0; }

  body.nav-open .main-nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 70px; left: 0; right: 0;
    background: var(--cream);
    padding: 24px 32px 32px;
    gap: 4px;
    box-shadow: 0 16px 32px rgba(12,27,42,0.1);
  }
  body.nav-open .main-nav a { padding: 12px 0; border-bottom: 1px solid rgba(12,27,42,0.06); color: var(--ink-soft); }
  body.nav-open .main-nav a:hover { color: var(--jade); }
  .menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle.is-open span:nth-child(2) { opacity: 0; }
  .menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 560px) {
  .container { padding: 0 20px; }
  .stats-grid { grid-template-columns: 1fr; row-gap: 32px; }
  .case-phases { grid-template-columns: 1fr 1fr; }
  .hero-cta { flex-direction: column; align-items: flex-start; }
  .contact-details { flex-direction: column; gap: 14px; }
}
