/* =========================================================
   Zian Hi-Tech — site styles
   ---------------------------------------------------------
   BRAND COLOURS: every colour on the site comes from the
   variables below. Swap these values for the exact brand
   hex codes and the whole site updates.
   ========================================================= */
:root {
  /* Zian Hi-Tech — brand green */
  --brand:        #298C69;  /* primary: buttons, accents (from the Zian logo) */
  --brand-dark:   #1F6E52;  /* hover, and links/small text (better contrast) */
  --brand-soft:   #E5F2EC;  /* tinted backgrounds */
  /* Yunshang Cashmere — amber orange */
  --amber:        #E38B1C;  /* Yunshang brand colour (matches the Yunshang logo) */
  --amber-text:   #9E5B07;  /* darker amber for small text on light backgrounds */
  --amber-soft:   #FCF0DE;  /* tinted backgrounds */

  --ink:          #1F2420;  /* headings and dark sections */
  --text:         #474C47;  /* body text */
  --muted:        #7A7F78;  /* secondary text */
  --bg:           #FAF9F5;  /* page background */
  --surface:      #FFFFFF;  /* cards, form */
  --alt:          #F2F1EA;  /* alternating section background */
  --line:         #E2E0D6;  /* borders and dividers */
  --on-dark:      #F3F2EC;  /* text on --ink backgrounds */

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(31, 36, 32, .04), 0 8px 24px rgba(31, 36, 32, .06);
  --container: 1160px;
  --header-h: 76px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand); }
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); font-weight: 500; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--on-dark); padding: 8px 14px; border-radius: var(--radius-sm); z-index: 100; }
.skip-link:focus { left: 8px; }

.eyebrow {
  font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand-dark); margin-bottom: .9em;
}
.lead { font-size: 1.15rem; color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 600 .95rem/1 var(--font-body);
  padding: 14px 22px; border-radius: 999px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 32px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; flex-shrink: 0; }
.brand-logo { height: 38px; width: auto; }
.brand-divider { width: 1px; height: 32px; background: var(--line); }
.amber { color: var(--amber-text); }
.dot { margin: 0 .35em; color: var(--muted); }
.nav { margin-left: auto; }
.nav-list { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; }
.nav-list a { color: var(--ink); text-decoration: none; font-size: .95rem; font-weight: 500; }
.nav-list a:hover { color: var(--brand); }
.nav-cta-mobile { display: none; }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero-copy p:not(.eyebrow):not(.lead) { color: var(--text); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-media { margin: 0; }
.hero-media img { width: 100%; border-radius: var(--radius); }

/* ---------- Key figures ---------- */
.figures { background: var(--ink); color: var(--on-dark); padding: 44px 0; }
.figures-title { font-family: var(--font-display); font-size: 1.2rem; text-align: center; margin-bottom: 28px; opacity: .9; }
.figures-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; }
.figures-grid > div { text-align: center; padding: 6px 12px; border-left: 1px solid rgba(255,255,255,.14); }
.figures-grid > div:first-child { border-left: 0; }
.figures-grid dt { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; opacity: .7; order: 2; }
.figures-grid dd { margin: 0 0 4px; font-family: var(--font-display); font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.1; }
.figures-grid dd span { font-family: var(--font-body); font-size: .9rem; margin-left: 4px; opacity: .75; }
.figures-grid dd small { display: block; font-family: var(--font-body); font-size: .75rem; opacity: .6; letter-spacing: .04em; line-height: 1.4; }
.figures-grid > div { display: flex; flex-direction: column-reverse; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--alt); }
.section-head { max-width: 760px; margin-bottom: 48px; }

.card-grid { display: grid; gap: 20px; }
.card-grid-4 { grid-template-columns: repeat(4, 1fr); }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; box-shadow: var(--shadow);
}
.card p { margin: 0; font-size: .97rem; }
.card-num { display: block; font-family: var(--font-display); color: var(--brand); font-size: 1rem; margin-bottom: 18px; }
.card-plain { box-shadow: none; background: transparent; }

/* ---------- About: two companies ---------- */
.arms { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.arm {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 30px; box-shadow: var(--shadow); border-top: 4px solid var(--brand);
}
.arm-yunshang { border-top-color: var(--amber); }
.arm-logo { height: 48px; width: auto; margin-bottom: 22px; }
.arm-tag { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-dark); margin-bottom: .5em; }
.arm-yunshang .arm-tag { color: var(--amber-text); }
.arm p:last-child { margin: 0; }

/* ---------- Certifications ---------- */
.certs-head { margin: 64px 0 24px; }
.certs-head h3 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); margin-bottom: .3em; }
.certs-head p { color: var(--muted); margin: 0; }
.certs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cert {
  display: flex; flex-direction: column; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
}
.cert-logo { height: 84px; width: 100%; display: flex; align-items: center; margin-bottom: 18px; }
.cert-logo img { max-height: 84px; max-width: 80%; width: auto; height: auto; object-fit: contain; }
.cert-logo img.logo-wide { max-height: 66px; }
.cert-abbr {
  width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-dark);
  font: 600 .9rem/1 var(--font-body); letter-spacing: .04em;
}
.cert h4 { font-family: var(--font-display); font-weight: 500; font-size: 1.1rem; color: var(--ink); margin: 0 0 4px; }
.cert p { font-size: .92rem; margin: 0 0 10px; flex: 1; }
.cert a { font-size: .9rem; font-weight: 500; }

/* ---------- Product ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.specs { margin: 32px 0 0; display: grid; gap: 14px; }
.spec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.spec dt { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.spec dd { margin: 0; font-size: .97rem; }
.spec strong { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1.3rem; color: var(--ink); margin-bottom: 2px; }
.image-stack { display: grid; gap: 16px; }
.image-stack img { width: 100%; border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; }
.image-stack img.product-photo { aspect-ratio: 4 / 4.4; object-position: 50% 30%; }

/* ---------- Production chain ---------- */
.chain {
  list-style: none; margin: 0 0 40px; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 0;
  counter-reset: step;
}
.chain li {
  position: relative; padding: 22px 16px 22px 0; border-top: 2px solid var(--line);
  counter-increment: step;
}
.chain li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; top: -13px; left: 0;
  background: var(--bg); padding-right: 10px;
  font-family: var(--font-display); color: var(--brand); font-size: .95rem;
}
.chain li span { display: block; font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); }
.chain li small { color: var(--muted); font-size: .88rem; }

/* ---------- Team ---------- */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.person {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px 26px; text-align: center; box-shadow: var(--shadow);
}
.person img { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; margin: 0 auto 18px; background: var(--brand-soft); }
.person h3 { margin-bottom: 4px; }
.person .role { color: var(--brand); font-size: .9rem; font-weight: 500; margin-bottom: 14px; }
.person p { font-size: .95rem; }
.person a { font-size: .92rem; word-break: break-word; }

/* ---------- Contact ---------- */
.contact-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.contact-list li { display: grid; gap: 2px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.contact-list span { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.contact-list a { word-break: break-word; }

.form {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 32px; box-shadow: var(--shadow); display: grid; gap: 18px;
}
.field { display: grid; gap: 6px; }
.field label { font-size: .9rem; font-weight: 500; color: var(--ink); }
.optional { color: var(--muted); font-weight: 400; }
.field input, .field textarea {
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; width: 100%; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}
.field textarea { resize: vertical; min-height: 130px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--on-dark); padding: 56px 0; font-size: .9rem; }
.site-footer p { opacity: .75; margin-bottom: .4em; }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; align-items: flex-end; }
.footer-brands { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-name { font-family: var(--font-display); font-size: 1.1rem; opacity: 1 !important; margin-bottom: .2em !important; padding-left: 12px; border-left: 3px solid var(--brand); }
.footer-name-amber { border-left-color: var(--amber); }
.footer-brands p:not(.footer-name) { padding-left: 15px; }
.footer-meta { text-align: right; }
.footer-meta .footer-links { justify-content: flex-end; margin-bottom: 10px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--on-dark); text-decoration: none; opacity: .85; }
.footer-links a:hover { opacity: 1; color: var(--on-dark); text-decoration: underline; }

/* ---------- Simple pages (thank-you, 404) ---------- */
.simple-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 80px 24px; }
.simple-page .inner { max-width: 560px; }
.simple-page img { height: 48px; width: auto; margin: 0 auto 32px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Hero image ---------- */
.hero-media img { aspect-ratio: 4 / 3.4; object-fit: cover; }

/* ---------- Yunshang story ---------- */
.story {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 28px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.story-media { margin: 0; }
.story-media img { width: 100%; height: 100%; object-fit: cover; }
.story-copy { padding: 40px 40px 36px; }
.story-copy h3 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); }
.story-copy p:last-child { margin: 0; }
.badge-first {
  display: inline-block; margin-bottom: 18px; padding: 8px 14px; border-radius: 999px;
  background: var(--amber-soft); color: var(--amber-text);
  font-size: .8rem; font-weight: 600; letter-spacing: .02em; line-height: 1.35;
}

/* ---------- Origin + map ---------- */
.origin { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: center; }
.map-wrap { margin: 0; }
.map-wrap figcaption { font-size: .78rem; color: var(--muted); text-align: right; margin-top: 6px; }
.map { width: 100%; height: auto; display: block; }
.map .r { fill: var(--surface); stroke: #D3D0C4; stroke-width: 1.2; }
.map .r-alxa { fill: var(--amber-soft); stroke: var(--amber); stroke-width: 1.6; }
.map .r-ordos { fill: var(--amber-soft); fill-opacity: .55; stroke: var(--line); stroke-width: 1.2; }
.map .map-region { font: 600 15px var(--font-body); letter-spacing: .3em; fill: var(--muted); opacity: .7; }
.map .map-label { font: 500 26px var(--font-display); fill: var(--ink); paint-order: stroke; stroke: var(--alt); stroke-width: 6px; stroke-linejoin: round; }
.map .map-sublabel { font: 500 16px var(--font-body); fill: var(--muted); letter-spacing: .02em; paint-order: stroke; stroke: var(--alt); stroke-width: 5px; stroke-linejoin: round; }
.map .map-dot { fill: var(--amber); stroke: #fff; stroke-width: 2; }
.map .map-dot-halo { fill: var(--amber); opacity: .22; }
.map .map-leader { stroke: var(--ink); stroke-width: 1; opacity: .5; }
.origin-photos { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-top: 40px; }
.origin-photos img { width: 100%; height: 100%; max-height: 520px; object-fit: cover; border-radius: var(--radius); }

/* ---------- Certification timeline ---------- */
.timeline {
  list-style: none; margin: 0 0 48px; padding: 0;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 0;
}
.timeline li { position: relative; padding: 30px 18px 0 0; border-top: 2px solid var(--line); }
.timeline li::before {
  content: ""; position: absolute; top: -8px; left: 0; width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--brand);
}
.timeline li:last-child::before { background: var(--brand); }
.tl-year { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--brand-dark); line-height: 1; margin-bottom: 10px; }
.timeline h4 { font-family: var(--font-display); font-weight: 500; font-size: 1.05rem; color: var(--ink); margin: 0 0 6px; line-height: 1.25; }
.timeline p { font-size: .9rem; margin: 0; }
.certs-sub { max-width: 760px; margin-bottom: 20px; }
.certs-sub p { color: var(--text); margin: 0; }

/* ---------- Dehairing explainer ---------- */
.explainer {
  margin-top: 16px; padding: 26px 26px 22px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--amber);
}
.explainer h3 { font-size: 1.2rem; }
.explainer p { font-size: .95rem; }
.explainer p:last-child { margin: 0; }

/* ---------- Production flow + QA ---------- */
.chain-6 { grid-template-columns: repeat(6, 1fr); margin-bottom: 48px; }
.chain .optional { border-top-style: dashed; }
.chain .optional small { color: var(--amber-text); font-weight: 500; }
.split-media { align-items: stretch; gap: 40px; }
.media-tall { margin: 0; }
.media-tall img { width: 100%; height: 100%; min-height: 360px; object-fit: cover; border-radius: var(--radius); }
.stack { display: grid; gap: 4px; align-content: center; }
.stack .card-plain { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 22px 0; }
.stack .card-plain:last-child { border-bottom: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .header-cta { display: none; }
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 6px;
    width: 44px; height: 44px; margin-left: auto; padding: 0 10px;
    background: transparent; border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
  }
  .nav-toggle .bar { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s; }
  .nav-toggle[aria-expanded="true"] .bar:first-of-type { transform: translateY(4px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .bar:last-of-type { transform: translateY(-4px) rotate(-45deg); }

  .nav { position: absolute; top: var(--header-h); left: 0; right: 0; margin: 0; }
  .nav-list {
    display: none; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 24px 20px;
  }
  .nav-list.open { display: flex; }
  .nav-list li a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav-cta-mobile { display: block; }
  .nav-cta-mobile a { color: var(--brand-dark); border-bottom: 0 !important; }
}

@media (max-width: 1024px) {
  .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .certs { grid-template-columns: repeat(2, 1fr); }
  .hero-grid, .split { gap: 40px; }
  .timeline { grid-template-columns: repeat(3, 1fr); row-gap: 36px; }
  .chain-6 { grid-template-columns: repeat(3, 1fr); row-gap: 28px; }
  .origin { gap: 32px; }
}

@media (max-width: 860px) {
  .hero { padding: 32px 0 56px; }
  .hero-grid, .split, .story, .origin { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .story-media img { max-height: 320px; }
  .story-copy { padding: 28px 24px; }
  .figures-grid { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
  .figures-grid > div:nth-child(3) { border-left: 0; }
  .section { padding: 72px 0; }
  .card-grid-3, .team-grid, .arms, .certs { grid-template-columns: 1fr; }
  .brand { gap: 10px; }
  .brand-logo { height: 30px; }
  .brand-divider { height: 24px; }
  .footer-meta { text-align: left; }
  .footer-meta .footer-links { justify-content: flex-start; }
  .chain, .chain-6, .timeline { grid-template-columns: 1fr; row-gap: 0; }
  .chain li { border-top: 0; border-left: 2px solid var(--line); padding: 4px 0 20px 24px; }
  .chain .optional { border-left-style: dashed; }
  .chain li::before { position: static; display: block; padding: 0; background: none; margin-bottom: 2px; }
  .timeline li { border-top: 0; border-left: 2px solid var(--line); padding: 0 0 28px 26px; }
  .timeline li::before { top: 2px; left: -8px; }
  .origin-photos { grid-template-columns: 1fr 1fr; }
  .origin-photos img { max-height: 360px; }
  .media-tall img { min-height: 240px; max-height: 340px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .card-grid-4 { grid-template-columns: 1fr; }
  .form { padding: 22px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .brand-logo { height: 26px; }
  .brand { gap: 8px; }
  .origin-photos { grid-template-columns: 1fr; }
  .origin-photos img:last-child { max-height: 300px; }
}
