/* =========================================================
   JINGHUI 3D — Industrial / Minimal / Modern Frontend
   Design system + components + responsive
   Author: built for Shenzhen Jinghui 3D Intelligent Manufacturing
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  --bg: #eaf2fc;            /* light blue page */
  --surface: #ffffff;
  --surface-2: #f3f8fe;
  --line: #d6e4f4;
  --line-soft: #e4eefb;
  --text: #0f2c4a;          /* deep blue-ink */
  --text-soft: #4f6275;
  --text-light: #eaf4ff;    /* for blue blocks */
  --text-light-soft: #b9cee6;
  --accent: #1f6fe0;        /* blue */
  --accent-2: #4f9bff;
  --accent-ink: #0a1f3a;
  --bg-blue: #123a66;       /* deep blue for hero / footer / dark sections */
  --radius: 4px;
  --maxw: 1240px;
  --gut: clamp(20px, 5vw, 64px);
  --mono: "SFMono-Regular", "JetBrains Mono", "Roboto Mono", Consolas, monospace;
  --sans: "Inter", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --shadow: 0 24px 60px -28px rgba(0,0,0,.35);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.12; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 .4em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 3rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }
p { margin: 0 0 1.1em; color: var(--text-soft); }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }
section { padding: clamp(64px, 9vw, 130px) 0; }
.eyebrow {
  font-family: var(--mono); font-size: .8rem; letter-spacing: .22em;
  text-transform: uppercase; color: var(--accent); font-weight: 600;
  display: inline-flex; align-items: center; gap: .6em;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--accent); display: inline-block; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--text-soft); max-width: 60ch; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  padding: 14px 26px; border-radius: var(--radius);
  font-weight: 600; font-size: .98rem; cursor: pointer; border: 1px solid transparent;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #3f86ef; transform: translateY(-2px); }
.btn-ghost { border-color: currentColor; color: inherit; }
.btn-ghost:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-light { background: #fff; color: #111; }
.btn-light:hover { background: #f2f2f2; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(18,58,102,.0); transition: background .3s ease, border-color .3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(18,58,102,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 74px; color: #fff;
}
.brand { font-weight: 800; font-size: 1.25rem; letter-spacing: .02em; display: flex; align-items: baseline; gap: .5em; }
.brand .dot { color: var(--accent); }
.brand small { font-family: var(--mono); font-size: .62rem; letter-spacing: .25em; color: var(--text-light-soft); display: block; font-weight: 500; }
.nav-links { display: flex; gap: 30px; align-items: center; list-style: none; margin: 0; padding:  0; }
.nav-links a { font-size: .95rem; color: #d8dde3; font-weight: 500; position: relative; padding: 8px 0; }
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links a.active::after, .nav-links a:hover::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--accent);
}
.has-sub { position: relative; }
.submenu {
  position: absolute; top: 100%; left: -16px; min-width: 240px;
  background: #123a66; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 0; opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: .2s ease; box-shadow: var(--shadow);
}
.has-sub:hover .submenu { opacity: 1; visibility: visible; transform: none; }
.submenu a { display: block; padding: 10px 18px; color: #dce8f7; font-size: .92rem; }
.submenu a:hover { background: #1a4a7d; color: #fff; }
.nav-cta { margin-left: 8px; }
.burger { display: none; background: none; border: 0; color: #fff; font-size: 1.6rem; cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  color: var(--text-light); background: linear-gradient(135deg, #114a86 0%, #0e3a6b 100%); overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: saturate(1.08) contrast(1.04); }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(6,22,46,.55) 0%, rgba(6,22,46,.30) 55%, rgba(6,22,46,.15) 100%); }
.hero-inner { position: relative; z-index: 2; padding-top: 90px; }
.hero h1 { max-width: 16ch; }
.hero p.lead { color: #d6e6f7; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-stats { display: flex; gap: clamp(24px, 5vw, 64px); margin-top: 56px; flex-wrap: wrap; }
.hero-stats .num { font-family: var(--mono); font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; color: #fff; }
.hero-stats .lbl { font-size: .82rem; color: var(--text-light-soft); letter-spacing: .08em; text-transform: uppercase; }
.scroll-cue { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); color: #fff; font-family: var(--mono); font-size: .7rem; letter-spacing: .25em; opacity: .7; }

/* ---------- Section variants ---------- */
.section-dark { background: var(--bg-blue); color: var(--text-light); }
.section-dark p { color: var(--text-light-soft); }
.section-soft { background: #f1f7fe; }
.section-line { border-top: 1px solid var(--line-soft); }

/* ---------- Generic block heading ---------- */
.block-head { margin-bottom: 48px; }
.block-head h2 { max-width: 18ch; }
.section-dark .block-head h2 { color: #fff; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 22px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 30px; transition: transform .2s ease, border-color .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.card .idx { font-family: var(--mono); color: var(--accent); font-size: .8rem; letter-spacing: .15em; }
.card h3 { margin: 12px 0 10px; }
.card-dark { background: #ffffff; border-color: var(--line); color: var(--text); }
.card-dark p { color: var(--text-soft); }

/* ---------- Feature / split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 80px); align-items: center; }
.split.reverse > .split-media { order: -1; }
.split-media { position: relative; }
.split-media img { border-radius: var(--radius); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.split-media .tag { position: absolute; left: 16px; bottom: 16px; background: rgba(18,58,102,.82); color: #fff; font-family: var(--mono); font-size: .72rem; padding: 6px 12px; letter-spacing: .1em; }

/* ---------- Stats strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { border-left: 2px solid var(--accent); padding-left: 18px; }
.stat .num { font-family: var(--mono); font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; color: var(--accent); line-height: 1; }
.stat .lbl { color: var(--text-soft); font-size: .9rem; }
.section-dark .stat .num { color: #fff; }
.section-dark .stat .lbl { color: var(--text-light-soft); }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step { padding-top: 26px; border-top: 1px solid var(--line); }
.step .n { font-family: var(--mono); color: var(--accent); font-size: 1.1rem; }
.step h3 { margin: 10px  0 8px; color: #fff; }
.step p { color: var(--text-light-soft); font-size: .95rem; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery-item { position: relative; overflow: hidden; border-radius: var(--radius); aspect-ratio: 4/3; cursor: pointer; border: 1px solid var(--line-soft); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item .cap { position: absolute; inset: auto 0 0 0; padding: 14px; background: linear-gradient(transparent, rgba(8,24,48,.82)); color: #fff; font-size: .85rem; font-family: var(--mono); opacity: 0; transition: .25s; }
.gallery-item:hover .cap { opacity: 1; }
.lightbox { position: fixed; inset: 0; background: rgba(8,20,40,.94); display: none; align-items: center; justify-content: center; z-index: 200; padding: 40px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 6px; }
.lightbox .close { position: absolute; top: 20px; right: 26px; color: #fff; font-size: 2rem; background: none; border: 0; cursor: pointer; }
.gallery-item[hidden] { display: none; }
.gallery-pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.gallery-pagination button { min-width: 40px; height: 40px; padding: 0 13px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); font: 600 .86rem var(--font); cursor: pointer; transition: .2s; }
.gallery-pagination button:hover:not(:disabled),
.gallery-pagination button.active,
.gallery-pagination button.active:hover { color: #fff !important; border-color: #1f6fe0; background-color: #1f6fe0 !important; box-shadow: 0 5px 14px rgba(31,111,224,.28); }
.gallery-pagination button:disabled { opacity: .42; cursor: not-allowed; }

/* Floating quick contact: Email / WhatsApp / Tawk.to chat */
.floating-contact { position:fixed; right:22px; bottom:24px; z-index:190; display:grid; justify-items:end; gap:10px; }
.floating-contact-btn { position:relative; display:flex; align-items:center; justify-content:flex-end; width:48px; min-height:48px; padding:8px; border:1px solid rgba(255,255,255,.25); border-radius:999px; background:rgba(7,24,44,.94); color:#fff; box-shadow:0 14px 36px rgba(5,22,42,.28); backdrop-filter:blur(12px); overflow:hidden; cursor:pointer; transition:width .2s ease,transform .18s ease,background .18s ease; }
.floating-contact-btn:hover,.floating-contact-btn:focus-visible { width:146px; transform:translateY(-2px); background:#0b2e54; }
.floating-contact-whatsapp:hover,.floating-contact-whatsapp:focus-visible { background:#128c4b; }
.floating-contact-label { position:absolute; right:46px; opacity:0; transform:translateX(8px); white-space:nowrap; font-size:12px; font-weight:800; pointer-events:none; transition:.16s ease; }
.floating-contact-btn:hover .floating-contact-label,.floating-contact-btn:focus-visible .floating-contact-label { opacity:1; transform:none; }
.floating-contact-icon { position:relative; z-index:1; flex:0 0 auto; width:30px; height:30px; display:grid; place-items:center; border-radius:50%; background:#fff; color:#0a1f3a; font-size:11px; font-weight:900; font-family:var(--sans); }
.floating-contact-whatsapp .floating-contact-icon { background:#25d366; color:#082c1a; }
.floating-contact-chat .floating-contact-icon { background:#00c77b; }
.floating-contact-chat-icon::before { content:""; width:17px; height:14px; display:block; border-radius:50% 50% 46% 46%; background:#fff; }
.floating-contact-chat-icon::after { content:""; position:absolute; right:7px; bottom:6px; width:7px; height:7px; background:#fff; clip-path:polygon(0 0,100% 35%,28% 100%); }

@media (max-width:560px) {
  .floating-contact { right:14px; bottom:16px; gap:8px; }
  .floating-contact-btn,.floating-contact-btn:hover,.floating-contact-btn:focus-visible { width:46px; min-height:46px; transform:none; }
  .floating-contact-label,.floating-contact-btn:hover .floating-contact-label,.floating-contact-btn:focus-visible .floating-contact-label { opacity:0; }
}

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--line-soft); }
.faq-q { width: 100%; text-align: left; background: none; border: 0; padding: 22px 0; font-size: 1.1rem; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; color: var(--text); }
.faq-q .ic { color: var(--accent); font-family: var(--mono); transition: transform .25s; }
.faq-item.open .ic { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a p { padding: 0 0 22px; margin: 0; }

/* ---------- Form ---------- */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label { font-size: .85rem; font-weight: 600; }
.field input, .field textarea, .field select {
  padding: 13px 14px; border: 1px solid var(--line-soft); border-radius: var(--radius);
  font: inherit; background: #fff; color: var(--text); width: 100%;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.form-note { font-size: .85rem; color: var(--text-soft); }
.form-ok { display: none; padding: 14px 16px; background: #e8f6ee; color: #14622e; border: 1px solid #b6e2c6; border-radius: var(--radius); margin-top: 12px; }
.form-ok.show { display: block; }

/* ---------- Contact info cards ---------- */
.info-card { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 26px; }
.info-card .k { font-family: var(--mono); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.info-card .v { color: var(--text); font-size: 1.05rem; word-break: break-word; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-blue); color: var(--text-light-soft); padding: 64px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.site-footer a { color: var(--text-light-soft); display: block; padding: 5px 0; }
.site-footer a:hover { color: var(--accent); }
.site-footer p { color: #d6e6f7; }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .85rem; }

/* ---------- Breadcrumb ---------- */
.crumb { font-family: var(--mono); font-size: .8rem; color: var(--text-light-soft); padding: 110px 0 0; }
.crumb a { color: var(--accent); }
.crumb span { color: #fff; }

/* ---------- Page hero (interior) ---------- */
.page-hero { background: var(--bg-blue); color: #fff; padding: 130px 0 70px; position: relative; overflow: hidden; }
.page-hero::after { content:""; position:absolute; right:-10%; top:-20%; width: 50%; height: 140%; background: radial-gradient(circle, rgba(79,155,255,.18), transparent 60%); }
.page-hero h1 { max-width: 20ch; }
.page-hero p { color: var(--text-light-soft); max-width: 60ch; }
.page-hero.banner-hero { min-height:clamp(440px,38vw,720px); display:flex; align-items:center; padding-top:100px; padding-bottom:60px; background-size:cover; background-position:center center; background-repeat:no-repeat; isolation:isolate; }
.page-hero.banner-hero::before { content:""; position:absolute; inset:0; z-index:-1; background:linear-gradient(90deg,rgba(4,18,39,.94) 0%,rgba(4,18,39,.78) 38%,rgba(4,18,39,.34) 72%,rgba(4,18,39,.18) 100%); }
.page-hero.banner-hero::after { z-index:-1; }
.page-hero.banner-hero .container { position:relative; z-index:1; }
.page-hero.contact-banner { background-position:center 22%; }

/* ---------- Table ---------- */
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); font-size: .95rem; }
.spec-table th { font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-soft); font-size: .8rem; }
.section-dark .spec-table td { color: var(--text-light); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav-links, .nav-cta { display: none; }
  .burger { display: block; }
  .nav-open .nav-links {
    display: flex; flex-direction: column; gap: 0; position: fixed; top: 74px; left: 0; right: 0;
    background: #123a66; padding: 12px var(--gut) 24px; border-bottom: 1px solid var(--line);
  }
  .nav-open .nav-links li { width: 100%; }
  .nav-open .nav-links a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav-open .submenu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: #0f3360; border: 0; padding: 0 0 8px 12px; }
  .cols-3, .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .cols-2, .cols-3, .cols-4, .steps, .stats, .gallery-grid, .form-row, .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; }
  .page-hero.banner-hero { min-height:420px; background-position:62% center; }
  .page-hero.contact-banner { background-position:64% center; }
}

/* ---------- News listing ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s ease, border-color .2s, box-shadow .2s; }
.news-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }
.news-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.news-card .meta { font-family: var(--mono); font-size: .72rem; letter-spacing: .1em; color: var(--accent); text-transform: uppercase; padding: 16px 18px 0; }
.news-card h3 { margin: 8px 18px 10px; font-size: 1.12rem; }
.news-card p { margin: 0 18px 16px; color: var(--text-soft); font-size: .92rem; }
.news-card .more { margin: auto 18px 18px; font-weight: 600; color: var(--accent); font-size: .9rem; }

/* ---------- Article ---------- */
.article-date { font-family: var(--mono); font-size: .82rem; letter-spacing: .08em; color: var(--text-light-soft); margin-top: 14px; text-transform: uppercase; }
.article-body { max-width: 820px; }
.article-hero { width: 100%; border-radius: var(--radius); aspect-ratio: 16/9; object-fit: cover; margin: 28px 0; }
.article-inline { width: 100%; border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; margin: 26px 0 8px; }
.article-body .cap { font-family: var(--mono); font-size: .76rem; letter-spacing: .08em; color: var(--text-soft); text-transform: uppercase; margin: 0 0 18px; }
.article-body blockquote { border-left: 3px solid var(--accent); margin: 26px 0; padding: 4px 0 4px 20px; font-size: 1.18rem; line-height: 1.5; color: var(--text); font-style: italic; }
.article-cta { margin-top: 34px; }

@media (max-width: 960px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .news-grid { grid-template-columns: 1fr; } }
