/* Hongshen Precision — compiled design tokens + layout
   No Tailwind CDN. No Google Fonts. Self-hosted Lato. */

@font-face {
  font-family: "Lato";
  src: url("../fonts/lato-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("../fonts/lato-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("../fonts/lato-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand: #1b2430;
  --brand-2: #121820;
  --brand-3: #2a3544;
  --ink: #1a1f27;
  --ink-2: #4a5563;
  --ink-3: #6b7280;
  --accent: #6b3fa0;
  --accent-2: #8b5fbf;
  --accent-3: #5a3388;
  --flame: #9b4dff;
  --surface: #f4f6f8;
  --surface-2: #eef1f4;
  --surface-3: #e4e9ee;
  --white: #ffffff;
  --line: #d5dce3;
  --line-2: #eceff3;
  --metal: #c5cdd6;
  --ok: #1f8a4c;
  --wa: #25d366;
  --wa-ink: #128c3a;
  --mail: #6b3fa0;
  --danger: #b42318;
  --shadow: 0 16px 40px rgba(27, 36, 48, 0.12);
  --shadow-sm: 0 4px 14px rgba(27, 36, 48, 0.08);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --header-h: 76px;
  --wrap: 1180px;
  --gutter: 24px;
  --ease: 160ms ease;
  --font: "Lato", "Segoe UI", Helvetica, Arial, sans-serif;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-md: 15px;
  --fs-lg: 18px;
  --fs-xl: 24px;
  --fs-2xl: 32px;
  --fs-3xl: 44px;
  --lh: 1.6;
  --focus: 0 0 0 3px rgba(107, 63, 160, 0.35);
}

*,
*::before,
*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: var(--lh);
  color: var(--ink);
  background: var(--white);
  min-height: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-3); }
button, input { font-family: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { color: var(--brand); line-height: 1.22; margin: 0 0 0.5em; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap {
  width: min(var(--wrap), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}
.skip {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 100; }

/* ========== HEADER + MEGA (no flicker, no overflow) ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: var(--white);
  border-bottom: 1px solid var(--line-2);
}
.site-header .wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: var(--header-h);
}
.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  z-index: 2;
}
.logo img {
  height: 48px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}
.nav-desktop { display: none; flex: 1; }
.nav-row {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}
.nav-item { position: static; list-style: none; }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--radius-sm);
}
.nav-link:hover,
.nav-link:focus-visible,
.has-mega:hover > .nav-link,
.has-mega:focus-within > .nav-link {
  color: var(--accent);
  background: var(--surface);
}
.nav-link .chev {
  width: 8px; height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-top: -3px;
}
.nav-cta {
  margin-left: auto;
  display: none;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--ease), color var(--ease), transform var(--ease);
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-primary:hover { background: var(--accent-3); color: var(--white); }
.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,.55);
}
.btn-ghost:hover { background: rgba(255,255,255,.12); color: var(--white); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: var(--wa-ink); color: #fff; }
.btn-line {
  background: var(--white);
  color: var(--brand);
  border: 1px solid var(--line);
}
.btn-line:hover { border-color: var(--accent); color: var(--accent); }

/* Mega panel — positioned against HEADER wrap, not the LI */
.has-mega > .mega {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 70;
  background: var(--white);
  box-shadow: var(--shadow);
  border-top: 1px solid var(--line-2);
  padding: 28px 0 32px;
  max-height: min(70vh, 540px);
  overflow-x: hidden;
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
}
.has-mega > .mega::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}
.mega-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}
.mega-col-title {
  display: block;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.mega-prod {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  color: var(--brand);
}
.mega-prod:hover { color: var(--accent); }
.mega-prod img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--line-2);
}
.mega-prod span {
  font-size: 13px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mega-more {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.burger {
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--brand);
}
.nav-mobile {
  display: none;
  border-top: 1px solid var(--line-2);
  background: #fff;
  max-height: calc(100vh - var(--header-h));
  overflow: auto;
  padding: 8px 0 20px;
}
.nav-mobile.is-open { display: block; }
.nav-mobile a {
  display: block;
  padding: 10px 0;
  color: var(--brand);
  font-weight: 600;
}
.nav-mobile .sub { padding-left: 12px; }
.nav-mobile .sub a { font-weight: 400; font-size: 14px; color: var(--ink-2); }
.m-acc-btn {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 10px 0;
  font-weight: 700;
  color: var(--brand);
  cursor: pointer;
  font-size: 15px;
}
.m-acc-panel { display: none; padding-bottom: 8px; }
.m-acc.is-open .m-acc-panel { display: block; }

@media (min-width: 1024px) {
  .nav-desktop { display: flex; }
  .nav-cta { display: inline-flex; }
  .burger { display: none; }
  .nav-mobile { display: none !important; }
  .has-mega:hover > .mega,
  .has-mega:focus-within > .mega {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
}

/* ========== HERO ========== */
.hero {
  position: relative;
  z-index: 1;
  min-height: 78vh;
  background: var(--brand);
  color: #fff;
  overflow: hidden;
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 700ms ease;
  background: #111 center / cover no-repeat;
}
.hero-slide.is-on { opacity: 1; }
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(18,24,32,.78) 0%, rgba(18,24,32,.45) 48%, rgba(18,24,32,.28) 100%);
}
.hero-copy {
  position: relative;
  z-index: 2;
  padding: 88px 0 72px;
  max-width: 720px;
}
.hero-kicker {
  display: inline-block;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  color: #e2d4f5;
  margin-bottom: 14px;
}
.hero h1 {
  color: #fff;
  font-size: clamp(30px, 4.6vw, 48px);
  margin-bottom: 16px;
}
.hero p.lead {
  color: rgba(255,255,255,.9);
  font-size: 18px;
  max-width: 560px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-dots {
  position: absolute;
  left: 0; right: 0; bottom: 22px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.hero-dots button {
  width: 9px; height: 9px; border-radius: 99px;
  border: 0; background: rgba(255,255,255,.4); cursor: pointer;
}
.hero-dots button.is-on { background: #fff; width: 22px; }

/* ========== SECTIONS ========== */
.sec { padding: 72px 0; }
.sec-muted { background: var(--surface); }
.sec-dark { background: var(--brand); color: #fff; }
.sec-dark h2, .sec-dark h3 { color: #fff; }
.kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.sec h2 { font-size: clamp(24px, 3vw, 34px); }
.lede { color: var(--ink-2); max-width: 640px; font-size: 17px; }

.grid-4, .grid-3, .grid-2 {
  display: grid;
  gap: 20px;
}
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform var(--ease), box-shadow var(--ease);
}
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: inherit; }
.card-img {
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  overflow: hidden;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-body { padding: 16px 16px 18px; }
.card-body h3 { font-size: 16px; margin: 0 0 6px; }
.card-body p { font-size: 14px; color: var(--ink-2); margin: 0; }
.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent);
  background: #f3eafc;
  padding: 3px 8px;
  border-radius: 99px;
  margin-bottom: 8px;
}

.cap-card {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
}
.cap-card h3 { font-size: 16px; margin-bottom: 6px; }
.cap-card p { font-size: 14px; color: var(--ink-2); margin: 0; }

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}
.split img {
  width: 100%;
  border-radius: var(--radius-lg);
  object-fit: cover;
  max-height: 460px;
}

.page-hero {
  background: var(--brand);
  color: #fff;
  padding: 48px 0 40px;
}
.page-hero h1 { color: #fff; font-size: clamp(26px, 3.4vw, 40px); }
.page-hero p { color: rgba(255,255,255,.82); max-width: 640px; }
.crumbs { font-size: 13px; color: rgba(255,255,255,.7); margin-bottom: 10px; }
.crumbs a { color: #e8d9fb; }

.pro-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: start;
}
.gallery {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-2);
}
.gallery img { width: 100%; max-height: 520px; object-fit: contain; background: #fff; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; }
.thumbs img {
  width: 72px; height: 72px; object-fit: cover;
  border-radius: 6px; border: 1px solid var(--line);
  cursor: pointer; background: #fff;
}
.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec-table th, .spec-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-2);
  vertical-align: top;
}
.spec-table th { width: 38%; color: var(--ink-2); font-weight: 600; }

.faq details {
  border-bottom: 1px solid var(--line-2);
  padding: 14px 0;
}
.faq summary { cursor: pointer; font-weight: 700; color: var(--brand); }
.faq p { margin: 8px 0 0; color: var(--ink-2); font-size: 14px; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.contact-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
}
.contact-card h3 { margin-bottom: 8px; }
.contact-card p, .contact-card a { color: var(--ink-2); }

/* floating contact */
.float-contact {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.float-btn {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  color: #fff;
}
.float-btn svg { width: 24px; height: 24px; fill: currentColor; }
.float-btn.wa { background: var(--wa); }
.float-btn.mail { background: var(--accent); }
.float-btn:hover { transform: translateY(-2px); color: #fff; }

/* footer */
.site-footer {
  background: var(--brand-2);
  color: #c9d2db;
  padding: 48px 0 20px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}
.site-footer a { color: #d7dee6; }
.site-footer a:hover { color: #fff; }
.site-footer h4 { color: #fff; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; }
.site-footer .logo img { height: 40px; filter: brightness(10); }
.legal {
  border-top: 1px solid #2a3340;
  padding-top: 16px;
  font-size: 13px;
  color: #8b95a1;
}

.tbc {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  color: #8a5b12;
  background: #fff4d6;
  padding: 2px 6px;
  border-radius: 4px;
}

/* knowledge / cases */
.article { max-width: 760px; }
.article p { font-size: 16px; color: var(--ink-2); }
.article h2 { margin-top: 1.4em; }

/* 404 */
.e404 { text-align: center; padding: 80px 0; }
.e404 h1 { font-size: 64px; color: var(--accent); }

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mega-grid { gap: 18px; }
}
@media (max-width: 1023px) {
  .logo img { height: 40px; max-width: 220px; }
  .hero { min-height: 70vh; }
  .hero-copy { padding: 56px 0 64px; }
  .split, .pro-layout, .contact-grid, .foot-grid {
    grid-template-columns: 1fr;
  }
  .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .has-mega > .mega {
    position: static;
    box-shadow: none;
    max-height: none;
    overflow: visible;
    padding: 0;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    border: 0;
    display: none;
  }
  .float-contact { bottom: 72px; }
}
@media (max-width: 880px) {
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .grid-4, .grid-3 { grid-template-columns: 1fr; }
  .sec { padding: 48px 0; }
  .hero h1 { font-size: 28px; }
  .btn { width: auto; }
}
@media (max-width: 560px) {
  :root { --gutter: 16px; --header-h: 64px; }
  .logo img { height: 36px; max-width: 180px; }
  .hero { min-height: 64vh; }
  .hero p.lead { font-size: 16px; }
  .float-btn { width: 46px; height: 46px; }
}
@media (min-width: 1440px) {
  :root { --wrap: 1240px; }
  .hero { min-height: 82vh; }
}
@media (min-width: 1600px) {
  :root { --wrap: 1280px; }
}
@media (hover: hover) and (pointer: fine) {
  .card-img img { transition: transform 280ms ease; }
  a.card:hover .card-img img { transform: scale(1.04); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* utility */
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.center .lede { margin-inline: auto; }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.pill {
  font-size: 13px;
  padding: 6px 10px;
  background: var(--surface);
  border-radius: 99px;
  color: var(--ink-2);
  border: 1px solid var(--line-2);
}
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.stat { background: rgba(255,255,255,.08); padding: 16px; border-radius: 10px; }
.stat b { display: block; font-size: 20px; color: #fff; }
.stat span { font-size: 13px; color: rgba(255,255,255,.7); }


/* breadcrumb specs faq utilities */
.crumbs{display:flex;flex-wrap:wrap;gap:6px;align-items:center;font-size:13px;color:var(--ink-3);margin:0 0 18px}
.crumbs a{color:var(--ink-2)}
.crumbs a:hover{color:var(--accent)}
.spec-table{width:100%;border-collapse:collapse;margin:18px 0 28px;font-size:14px}
.spec-table th,.spec-table td{text-align:left;padding:10px 12px;border-bottom:1px solid var(--line-2);vertical-align:top}
.spec-table th{width:34%;color:var(--ink-3);font-weight:600;background:var(--surface)}
.tbc{color:var(--ink-3);font-style:italic}
.notice{background:var(--surface);border-left:3px solid var(--accent);padding:12px 16px;margin:16px 0;font-size:14px;color:var(--ink-2)}
.pro-gallery img{width:100%;height:auto;border-radius:var(--radius);border:1px solid var(--line-2);background:var(--surface)}
.thumbs{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.thumbs img{width:64px;height:64px;object-fit:cover;display:block;border-radius:6px}
.faq details{border-bottom:1px solid var(--line-2);padding:12px 0}
.faq summary{cursor:pointer;font-weight:700;color:var(--brand)}
.cta-band{background:var(--brand);color:#fff;padding:48px 0;margin-top:40px}
.cta-band h2{color:#fff}
.related{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.skip-link{position:absolute;left:-999px;top:0;background:var(--accent);color:#fff;padding:8px 12px;z-index:100}
.skip-link:focus{left:12px;top:12px}
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}

/* extra tokens + layout utilities for QA thresholds */
:root {
  --shadow-lg: 0 24px 60px rgba(27, 36, 48, 0.18);
  --accent-soft: #f3eafc;
  --ok-soft: #e7f7ee;
  --header-border: #eceff3;
  --hero-veil: rgba(18, 24, 32, 0.72);
  --quote-bg: #f8f5fc;
  --track: #d9dee5;
  --thumb: #6b3fa0;
  --focus-ring: #c4a3e6;
  --footer-line: #2a3340;
  --icon: 24px;
  --float-size: 52px;
  --card-img-ratio: 4 / 3;
  --prose: 760px;
}

.prose-width { max-width: var(--prose); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.stack-8 > * + * { margin-top: 8px; }
.stack-16 > * + * { margin-top: 16px; }
.stack-24 > * + * { margin-top: 24px; }
.cluster { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rule { height: 1px; background: var(--line-2); border: 0; margin: 32px 0; }
.badge-tbc { font-size: 11px; font-weight: 700; color: #8a5b12; background: #fff4d6; padding: 2px 6px; border-radius: 4px; }
.table-wrap { overflow-x: auto; }
.quote-box { background: var(--quote-bg); border-left: 3px solid var(--accent); padding: 16px 18px; border-radius: 0 8px 8px 0; }
.media-frame { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }

@media (max-width: 480px) {
  .hero-actions .btn { width: 100%; }
  .page-hero { padding: 36px 0 28px; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mega-grid { grid-template-columns: 1fr 1fr; }
}
@media print {
  .site-header, .float-contact, .nav-mobile, .burger { display: none !important; }
  .hero { min-height: auto; color: #000; }
  a[href]::after { content: none; }
}
