/* Jinxuan Tech (jinxuantech.com) — global styles. Industrial chemical B2B, light theme. */
:root {
  --blue: #0b5cab;
  --blue-dark: #083f78;
  --blue-light: #e8f1fb;
  --ink: #1c2733;
  --muted: #5a6b7b;
  --bg: #ffffff;
  --bg-alt: #f4f7fa;
  --line: #dde5ec;
  --ok: #1a7f4e;
  --maxw: 1120px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--ink); background: var(--bg);
  line-height: 1.65; font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  background: var(--bg); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; color: var(--blue-dark); }
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 6px; background: var(--blue);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 800; letter-spacing: 0.5px;
}
.nav { display: flex; gap: 22px; }
.nav a { color: var(--ink); font-weight: 600; font-size: 15px; }
.nav a:hover, .nav a.active { color: var(--blue); text-decoration: none; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 70%);
  color: #fff; padding: 72px 0 64px;
}
.hero h1 { font-size: 38px; line-height: 1.25; max-width: 720px; }
.hero p { margin-top: 16px; font-size: 18px; max-width: 640px; color: #dbe9f8; }
.hero .cta { margin-top: 28px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 6px; font-weight: 700; font-size: 15px;
}
.btn-primary { background: #fff; color: var(--blue-dark); }
.btn-primary:hover { text-decoration: none; background: var(--blue-light); }
.btn-ghost { border: 2px solid rgba(255,255,255,.7); color: #fff; }
.btn-ghost:hover { text-decoration: none; background: rgba(255,255,255,.12); }

/* Sections */
section { padding: 56px 0; }
section.alt { background: var(--bg-alt); }
.section-title { font-size: 26px; color: var(--blue-dark); margin-bottom: 8px; }
.section-sub { color: var(--muted); margin-bottom: 30px; max-width: 720px; }

/* Cards */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } .hero h1 { font-size: 30px; } }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  transition: box-shadow .15s ease, transform .15s ease;
}
.card:hover { box-shadow: 0 6px 18px rgba(11,92,171,.12); transform: translateY(-2px); }
.card .thumb { aspect-ratio: 4/3; background: var(--bg-alt); overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 16px 18px 18px; }
.card h3 { font-size: 17px; color: var(--ink); margin-bottom: 6px; }
.card p { font-size: 14px; color: var(--muted); }
.tag {
  display: inline-block; font-size: 12px; font-weight: 700; color: var(--blue);
  background: var(--blue-light); border-radius: 4px; padding: 2px 8px; margin-bottom: 8px;
}

/* Feature list */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
.feature { border-left: 3px solid var(--blue); padding-left: 14px; }
.feature h3 { font-size: 16px; margin-bottom: 4px; }
.feature p { font-size: 14px; color: var(--muted); }

/* Tables (specs) */
table.spec { width: 100%; border-collapse: collapse; font-size: 15px; margin: 18px 0 26px; }
table.spec th, table.spec td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
table.spec th { background: var(--blue-light); color: var(--blue-dark); width: 34%; }
table.spec td { background: #fff; }

/* Product page */
.product-hero { padding: 48px 0 40px; }
.product-hero h1 { font-size: 30px; color: var(--blue-dark); }
.product-hero .lede { color: var(--muted); font-size: 17px; margin-top: 10px; max-width: 780px; }
.product-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; align-items: start; }
@media (max-width: 900px) { .product-layout { grid-template-columns: 1fr; } }
.product-layout .gallery { display: grid; gap: 12px; }
.product-layout .gallery img { border: 1px solid var(--line); border-radius: 8px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.badge {
  font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 20px;
  background: var(--bg-alt); border: 1px solid var(--line); color: var(--muted);
}
.badge.hl { background: var(--blue-light); border-color: var(--blue); color: var(--blue-dark); }

/* Note / disclaimer */
.note {
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: 8px;
  padding: 14px 18px; font-size: 14px; color: var(--muted); margin-top: 20px;
}

/* CTA band */
.cta-band { background: var(--blue-dark); color: #fff; text-align: center; padding: 48px 0; }
.cta-band h2 { font-size: 24px; margin-bottom: 10px; }
.cta-band p { color: #c9dcf0; margin-bottom: 22px; }

/* Footer */
.site-footer { background: #0e1822; color: #9db1c4; padding: 40px 0 28px; font-size: 14px; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; margin-bottom: 24px; }
@media (max-width: 700px) { .site-footer .cols { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 10px; }
.site-footer a { color: #9db1c4; }
.site-footer a:hover { color: #fff; }
.site-footer .legal { border-top: 1px solid #233240; padding-top: 16px; font-size: 13px; color: #6d8296; }

/* ===== Motion layer (progressive enhancement; no-JS = visible static) ===== */
:root { --ease: cubic-bezier(.22,1,.36,1); }

/* --- IO 入场：仅 JS 存在时才先隐藏 --- */
.js .io { opacity: 0; transform: translateY(26px); }
.js .io.in { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .io-d1.in { transition-delay: .1s; } .js .io-d2.in { transition-delay: .2s; } .js .io-d3.in { transition-delay: .3s; }

/* --- Hero 微视差光斑（背景装饰，不碰内容） --- */
.hero { position: relative; overflow: hidden; }
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(60px);
  opacity: .5; pointer-events: none; will-change: transform;
}
.hero::before { width: 480px; height: 480px; left: -120px; top: -140px;
  background: radial-gradient(circle, rgba(96,171,255,.55), transparent 65%);
  transform: translate(calc(var(--mx,0) * 18px), calc(var(--my,0) * 18px)); }
.hero::after { width: 380px; height: 380px; right: -100px; bottom: -160px;
  background: radial-gradient(circle, rgba(26,127,78,.35), transparent 65%);
  transform: translate(calc(var(--mx,0) * -24px), calc(var(--my,0) * -24px)); }

/* --- 镜头分镜区：sticky 舞台 + 进度变量 --- */
.cam { height: 380vh; position: relative; --p: 1; --en: 1; --sp: 1; --rg: 1; --cta: 1; }
.js .cam { --p: 0; --en: 0; --sp: 0; --rg: 0; --cta: 0; }  /* JS 接管后由引擎写真实值 */
.cam-sticky {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  background:
    radial-gradient(90% 70% at 78% 45%, #12283d 0%, transparent 60%),
    radial-gradient(70% 60% at 15% 85%, #0f2436 0%, transparent 55%),
    #0b1622;
  display: flex; align-items: center; justify-content: center;
}
.cam-img {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end;
  padding-right: 6vw; will-change: transform, opacity; backface-visibility: hidden;
}
.cam-img img {
  width: min(78vh, 56vw); aspect-ratio: 4/3; object-fit: cover;
  border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.55);
}
@media (max-width: 760px) {
  .cam-img { justify-content: center; padding-right: 0; }
  .cam-img img { width: min(88vw, 480px); }
}
.cam-img.a img { transform: scale(calc(.8 + var(--en) * .22 - var(--rg) * .12)); opacity: calc(1 - var(--sp) * 1.6); }
.cam-img.b img { transform: scale(calc(1.12 - var(--sp) * .1)); opacity: clamp(0, (var(--sp) - .1) / .5, calc(1 - var(--rg) * 1.4)); }
.cam-img.c img { transform: scale(calc(1.05 + var(--rg) * .12)); opacity: clamp(0, (var(--rg) - .12) / .4, 1); }

.cam-word {
  position: absolute; left: 5vw; top: 18vh; z-index: 3;
  font-size: clamp(44px, 9vw, 110px); font-weight: 800; letter-spacing: -.01em;
  mix-blend-mode: difference; color: #f2f2f2; line-height: 1;
  will-change: transform, opacity;
}
.cam-word i {
  font-style: normal; display: inline-block; white-space: pre;
  --eni: clamp(0, var(--vis) * 1.9 - var(--i) * .13, 1);
  opacity: var(--eni);
  transform: translateX(calc((1 - var(--eni)) * (var(--i) - 5) * 1.6vw));
}
.cam-word .accent { color: #4da3ff; mix-blend-mode: normal; }
.cam-sub {
  position: absolute; left: 5vw; top: calc(18vh + clamp(56px, 10vw, 120px)); z-index: 3; max-width: 480px;
  color: #c9d7e4; font-size: 15px; line-height: 1.6;
  opacity: var(--vis); transform: translateY(calc((1 - var(--vis)) * 20px));
  will-change: transform, opacity;
}
/* 幕窗口：淡入×淡出（默认 --vis:1 = 无 JS 完成态全可见；.js 下交引擎接管） */
.cam-word, .cam-sub { --vis: 1; }
.js .cam-word.w1, .js .cam-sub.s1 { --vis: calc(var(--en) * (1 - var(--sp))); }
.js .cam-word.w2, .js .cam-sub.s2 { --vis: calc(var(--sp) * (1 - var(--rg))); }
.js .cam-word.w3, .js .cam-sub.s3 { --vis: var(--rg); }
.cam-word.w3 { mix-blend-mode: normal; color: #fff; }
.cam-cta {
  position: absolute; right: 6vw; bottom: 10vh; z-index: 4;
  opacity: var(--cta); transform: translateY(calc((1 - var(--cta)) * 26px));
}
.cam-glow {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(60% 50% at 70% 60%, rgba(26,127,78, calc(var(--rg) * .38)), transparent 70%);
}
.cam-progress {
  position: absolute; left: 0; top: 0; height: 3px; z-index: 5;
  background: linear-gradient(90deg, #4da3ff, #1a7f4e);
  width: calc(var(--p) * 100%);
}
.cam .cam-fallback { display: none; }

/* --- 跑马灯 --- */
.ticker { background: #0e1822; border-block: 1px solid #22344a; overflow: hidden; padding: 14px 0; }
.ticker-track { display: flex; gap: 0; width: max-content; will-change: transform; }
.ticker-track span {
  color: #7f97ad; font-size: 14px; font-weight: 700; letter-spacing: .14em;
  padding: 0 28px; white-space: nowrap;
}
.ticker-track span b { color: #4da3ff; font-weight: 800; }

/* --- 降级：reduced-motion / 无 JS 全直出 --- */
@media (prefers-reduced-motion: reduce) {
  .cam { height: auto; }
  .cam-sticky { position: static; height: auto; flex-direction: column; gap: 20px; padding: 48px 20px; }
  .cam-img { position: static; opacity: 1 !important; margin: 10px 0; }
  .cam-img img { transform: none !important; width: min(90vw, 560px); }
  .cam-word, .cam-sub { position: static; opacity: 1 !important; transform: none !important; margin: 8px 20px; }
  .cam-word i { opacity: 1 !important; transform: none !important; }
  .cam-cta { position: static; opacity: 1 !important; transform: none !important; margin: 16px 20px; }
  .cam-glow, .cam-progress { display: none; }
  .js .io { opacity: 1; transform: none; }
}
