/* ntjnchemical.com — global stylesheet (Phase 2 step2 Gate B — industry-top polish).
   Content/HTML frozen; this file only restyles existing markup. Pure static,
   no external fonts/CDN, no missing-asset references. */
:root {
  --white: #ffffff;
  --bg: #ffffff;
  --ink: #16223a;
  --ink-soft: #3a475a;
  --muted: #5b6b7e;
  --blue: #0078DC;
  --blue-700: #005bb0;
  --blue-soft: #e6f1fb;
  --blue-050: #f3f9fe;
  --green: #1f9d55;
  --green-soft: #e7f5ec;
  --line: #e7edf4;
  --radius: 10px;
  --radius-lg: 14px;
  --maxw: 1120px;
  --shadow-sm: 0 2px 10px rgba(15,40,80,.06);
  --shadow-md: 0 10px 28px rgba(15,40,80,.10);
  --shadow-lg: 0 18px 44px rgba(15,40,80,.16);
  --shadow: var(--shadow-md);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  /* Geometric brand stack: "Poppins" is the intended production face and must be
     self-hosted via the @font-face scaffold at the bottom of this file before launch;
     until then the browser falls through to Avenir Next / Avenir / Helvetica Neue,
     then the native system sans — no external font CDN is ever used. */
  font-family: "Poppins", "Avenir Next", "Avenir", "Helvetica Neue", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ============================================================
   @font-face scaffold for self-hosted Poppins (PRODUCTION ONLY).
   Keep this block commented out until /assets/fonts/poppins.woff2 exists;
   otherwise the live build would request a missing asset (red line #5).
   To activate: remove the comment markers and uncomment the block below.

   @font-face {
     font-family: "Poppins";
     font-style: normal;
     font-weight: 400 800;
     font-display: swap;
     src: url("/assets/fonts/poppins.woff2") format("woff2");
   }
   ============================================================ */
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.eyebrow { text-transform: uppercase; letter-spacing: 1.5px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* Header / nav */
.site-header { border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); backdrop-filter: saturate(160%) blur(8px); position: sticky; top: 0; z-index: 50; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; gap: 16px; }
.brand { display: inline-flex; align-items: center; }
/* Single canonical logo image — transparent bg → renders identically on white nav & dark footer */
.brand__logo { display: block; width: auto; height: 36px; }

/* Footer logo (transparent-bg PNG; renders cleanly on dark footer bg) */
.site-footer .footer__logo { display: block; height: 56px; width: auto; margin-bottom: 14px; }
.site-footer .footer-company-name { color: #fff; margin: 0 0 4px; font-weight: 600; }
.nav__list { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav__list a { display: block; padding: 8px 13px; border-radius: 8px; color: var(--ink); font-size: 14px; transition: background .15s ease, color .15s ease; }
.nav__list a:hover, .nav__list a.active { background: var(--blue-soft); color: var(--blue); text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; }

/* Buttons — inline-flex so the arrow sits cleanly beside the label */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: var(--radius); font-weight: 600; font-size: 14px; cursor: pointer; border: 1px solid transparent; transition: background .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease; }
.btn--primary { background: var(--blue); color: #fff; padding: 13px 24px; box-shadow: 0 6px 16px rgba(0,120,220,.28); }
.btn--primary:hover { background: var(--blue-700); text-decoration: none; transform: translateY(-1px); box-shadow: 0 10px 22px rgba(0,120,220,.34); }
.btn--ghost { background: transparent; border-color: var(--blue); color: var(--blue); }
.btn--ghost:hover { background: var(--blue-soft); text-decoration: none; }
.btn--sm { padding: 8px 15px; font-size: 13px; }
/* Arrow that nudges right on hover (used on hero + cta + nav primary) */
.btn--primary::after, .btn--ghost::after { content: "\2192"; font-weight: 700; transition: transform .18s ease; }
.btn--primary:hover::after, .btn--ghost:hover::after { transform: translateX(4px); }

/* Hero / sections */
.hero { padding: clamp(56px, 8vw, 88px) 0 48px; background: radial-gradient(1200px 400px at 70% -10%, var(--blue-soft), #fff); }
.hero .container { max-width: 880px; }
.hero .eyebrow { text-transform: uppercase; letter-spacing: 1.5px; font-size: 12px; color: var(--blue); font-weight: 700; margin: 0 0 8px; }
.hero h1 { font-size: clamp(30px, 4.4vw, 50px); font-weight: 800; letter-spacing: -.01em; line-height: 1.12; margin: 0 0 12px; text-wrap: balance; }
.lead { font-size: 18px; color: var(--ink-soft); max-width: 720px; }
.hero-actions { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--soft { background: var(--blue-050); }
.section h2 { position: relative; padding-top: 22px; font-size: clamp(24px, 3.2vw, 34px); font-weight: 800; letter-spacing: -.01em; margin: 0 0 22px; line-height: 1.22; text-wrap: balance; text-align: center; }
.section h2::before { content: ""; position: absolute; left: 50%; top: 0; transform: translateX(-50%); width: 46px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--blue), var(--blue-700)); }
.section > .container > .lead { margin-left: auto; margin-right: auto; text-align: center; }

/* Category grid (explicit responsive: 3 → 2 → 1) */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 28px; }
@media (max-width: 900px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cat-grid { grid-template-columns: 1fr; } }

/* Plain text card (Markets we serve) */
.cat-card { border: 1px solid var(--line); border-top: 3px solid var(--blue); border-radius: var(--radius-lg); padding: 22px 24px; background: #fff; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--blue-700); }
.cat-card h3 { margin: 0 0 6px; font-size: 18px; }
.cat-card__zh { color: var(--muted); margin: 0 0 4px; font-size: 13px; }
.cat-card__kw { color: var(--blue); font-size: 12px; margin: 0; }
.cat-card p:not(.cat-card__zh):not(.cat-card__kw) { font-size: 14px; color: var(--ink-soft); margin: 6px 0 0; }

/* Breadcrumb */
.breadcrumb { padding: 16px 0 0; }
.breadcrumb ol { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.breadcrumb li:not(:last-child)::after { content: "\203A"; margin-left: 8px; color: #c2cbd6; }
.breadcrumb [aria-current="page"] { color: var(--ink); }

/* CTA band */
.cta-band { background: linear-gradient(135deg, var(--blue-700), var(--blue) 72%); color: #fff; position: relative; overflow: hidden; padding: clamp(56px, 8vw, 84px) 0; margin-top: 24px; text-align: center; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(820px 320px at 82% -30%, rgba(255,255,255,.20), transparent 70%); pointer-events: none; }
.cta-band .container { position: relative; z-index: 1; }
.cta-band h2 { margin: 0 0 12px; color: #fff; font-size: clamp(22px, 3vw, 30px); text-wrap: balance; }
.cta-band p { max-width: 640px; margin: 0 auto 20px; color: rgba(255,255,255,.92); }
.cta-band .btn--primary { background: #fff; color: var(--blue); box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.cta-band .btn--primary:hover { background: #eef3ff; color: var(--blue-700); }
.cta-band .btn--primary::after { color: var(--blue); }

/* Evidence / placeholder notes */
.evidence-note { border-left: 4px solid var(--green); background: var(--green-soft); padding: 14px 16px; border-radius: 8px; margin: 24px auto 0; max-width: 760px; font-size: 14px; color: var(--ink-soft); }
.evidence-note strong { color: var(--green); }
.placeholder-note { border: 1px dashed #cdd6e2; background: #f7f9fc; color: var(--muted); padding: 12px 14px; border-radius: 8px; font-size: 14px; }

/* Trust list (why-choose) */
.why-list { list-style: none; padding: 0; margin: 0 auto; max-width: 760px; }
.why-list li { position: relative; padding-left: 36px; margin: 14px 0; font-size: 15px; color: var(--ink-soft); }
.why-list li::before { content: "\2713"; position: absolute; left: 0; top: 2px; width: 24px; height: 24px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-weight: 700; font-size: 13px; line-height: 24px; text-align: center; }

/* Two-column contact */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 32px 0; }
.contact-info { list-style: none; padding: 0; }
.contact-info li { margin: 6px 0; }

/* Form */
form label { display: block; margin: 12px 0; font-size: 14px; font-weight: 600; }
form input[type=text], form input[type=email], form select, form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #d4dbe5; border-radius: 8px; font: inherit; font-weight: 400; margin-top: 4px; transition: border-color .15s ease, box-shadow .15s ease;
}
form input[type=text]:focus, form input[type=email]:focus, form select:focus, form textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); outline: none; }
fieldset { border: 1px solid #d4dbe5; border-radius: 8px; padding: 12px; margin: 12px 0; }
legend { font-weight: 700; font-size: 14px; }
.chk { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; margin: 4px 12px 4px 0; }
.hp { position: absolute; left: -9999px; }
#form-status { font-size: 14px; min-height: 20px; }
#form-status.ok { color: var(--green); }
#form-status.err { color: #c0392b; }

/* Footer */
.site-footer { background: #0f1726; color: #c7d0dd; padding: 44px 0 24px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; }
.site-footer h4 { color: #fff; margin: 0 0 10px; font-size: 14px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links a { color: #c7d0dd; }
/* (legacy .site-footer .brand__name rule retired — full logo image is the brand mark now) */
.footer-bottom { border-top: 1px solid #1f2a3a; margin-top: 24px; padding-top: 16px; font-size: 13px; color: #8a97a8; }
/* footer-note retired — old-domain note removed from footer */

/* Responsive */
/* Collapse the desktop nav to a hamburger earlier (aligns with the home
   hero single-column breakpoint at 960px so the 9-link bar never crowds). */
@media (max-width: 960px) {
  .nav__list { display: none; position: absolute; top: 66px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 12px; border-bottom: 1px solid var(--line); }
  .nav__list.open { display: flex; }
  .nav-toggle { display: inline-flex; flex-direction: column; gap: 4px; background: none; border: 0; cursor: pointer; padding: 8px; }
  .nav-toggle span { width: 22px; height: 2px; background: var(--ink); display: block; }
}
@media (max-width: 760px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ============================================================
   Phase 3 (step3): immersive dark hero, media cards, video section.
   Targeting only the new home markup from scripts/gen_shell.py body_home.
   No external fonts/CDN, no missing-asset references.
   ============================================================ */

/* Immersive dark hero */
.hero--dark {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: clamp(90px, 13vw, 150px) 0 clamp(70px, 10vw, 120px);
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(7,16,34,.40) 0%, rgba(7,16,34,.52) 42%, rgba(5,12,26,.86) 100%);
}
/* Soft fade from hero into the white section below */
.hero--dark::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 130px;
  background: linear-gradient(180deg, transparent, var(--bg));
  z-index: 1;
}
.hero--dark .container { position: relative; z-index: 2; color: #fff; max-width: 920px; }
.hero--dark .eyebrow { display: inline-flex; align-items: center; gap: 10px; color: #9bd2ff; letter-spacing: 2px; font-size: 13px; font-weight: 700; }
.hero--dark .eyebrow::before { content: ""; width: 30px; height: 2px; background: #9bd2ff; display: inline-block; }
.hero--dark h1 { color: #fff; font-size: clamp(34px, 5.4vw, 62px); font-weight: 800; letter-spacing: -.02em; line-height: 1.05; margin: 16px 0 18px; text-shadow: 0 2px 26px rgba(0,0,0,.4); text-wrap: balance; }
.hero--dark .lead { color: rgba(255,255,255,.90); font-size: 19px; line-height: 1.65; max-width: 800px; margin-left: auto; margin-right: auto; }
.hero--dark .hero-actions { justify-content: center; }
.hero--dark .btn--primary { background: #fff; color: var(--blue); box-shadow: 0 10px 26px rgba(0,0,0,.28); }
.hero--dark .btn--primary:hover { background: #eef3ff; color: var(--blue-700); }
.hero--dark .btn--primary::after { color: var(--blue); }
.hero--dark .btn--ghost { background: transparent; border-color: rgba(255,255,255,.8); color: #fff; }
.hero--dark .btn--ghost:hover { background: rgba(255,255,255,.16); text-decoration: none; }

/* Hero play button (links to #video-section) */
.hero__play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  margin-top: 30px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.85);
  background: rgba(255,255,255,.14);
  backdrop-filter: blur(3px);
  color: #fff;
  transition: background .15s ease, transform .15s ease;
}
.hero__play:hover { background: rgba(255,255,255,.28); transform: scale(1.06); text-decoration: none; }
.hero__play svg { margin-left: 3px; }

/* Media cards (image top, body below) */
.cat-card--media {
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  background: #fff;
  position: relative;
}
.cat-card--media:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.cat-card__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.02);
  transition: transform .3s ease;
}
.cat-card--media:hover .cat-card__img { transform: scale(1.06); }
.cat-card__body { padding: 22px 24px 24px; }
.cat-card--media h3 { margin: 0 0 6px; font-size: 18px; }
.cat-card--media .cat-card__zh { color: var(--muted); margin: 0 0 4px; font-size: 13px; }
.cat-card--media .cat-card__kw { display: inline-block; margin: 12px 0 0; background: var(--blue-soft); color: var(--blue); padding: 4px 12px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; }
.cat-card--media p:not(.cat-card__zh):not(.cat-card__kw) { font-size: 14px; color: var(--ink-soft); margin: 6px 0 0; }

/* Video section */
.video-section { text-align: center; }
.video-section .lead { max-width: 640px; margin-left: auto; margin-right: auto; }
.video-section video {
  width: 100%;
  max-width: 960px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: block;
  margin: 28px auto 0;
  background: #0f1726;
}

/* ============================================================
   Phase 3 (step3) — Gate B visual motion polish.
   JS (public/js/script.js) adds the .reveal / .scrolled hooks; these rules
   drive the on-load entrance, scroll-reveal and card micro-interactions.
   Only transform/opacity are animated (GPU-friendly); reduced-motion honored.
   ============================================================ */

/* Scroll reveal — toggled by IntersectionObserver */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s cubic-bezier(.22,.61,.36,1), transform .6s cubic-bezier(.22,.61,.36,1); }
.reveal.is-visible { opacity: 1; transform: none; }

/* Hero entrance (on load) */
.hero--dark .eyebrow { animation: fadeInUp .7s .05s both; }
.hero--dark h1 { animation: fadeInUp .7s .15s both; }
.hero--dark .lead { animation: fadeInUp .7s .25s both; }
.hero--dark .hero-actions { animation: fadeInUp .7s .35s both; }
.hero--dark .hero__play { animation: fadeInUp .7s .45s both, pulse 2.4s 1.6s infinite; }
@keyframes fadeInUp { from { opacity:0; transform: translateY(22px);} to {opacity:1; transform:none;} }
@keyframes pulse { 0%,100%{ box-shadow:0 0 0 0 rgba(255,255,255,.35);} 50%{ box-shadow:0 0 0 14px rgba(255,255,255,0);} }

/* Hero background Ken Burns */
.hero__bg { animation: kenburns 18s ease-out both; }
@keyframes kenburns { from { transform: scale(1.05);} to { transform: scale(1.14);} }

/* Category media card — top accent bar over the image */
.cat-card--media { position: relative; }
.cat-card--media::before { content:""; position:absolute; left:0; top:0; height:3px; width:100%; background: linear-gradient(90deg, var(--blue), var(--blue-700)); transform: scaleX(0); transform-origin:left; transition: transform .35s ease; z-index:3; }
.cat-card--media:hover::before { transform: scaleX(1); }

/* Category media card — hover arrow on the title link */
.cat-card--media h3 a::after { content:" \2192"; color: var(--blue); opacity:0; transition: opacity .2s; }
.cat-card--media:hover h3 a::after { opacity:1; }

/* Header scrolled shadow (toggled by JS) */
.site-header.scrolled { box-shadow: 0 4px 18px rgba(15,40,80,.10); }

/* Preserve the card hover-lift after the scroll-reveal resolves (.reveal.is-visible
   would otherwise pin transform:none and suppress the existing translateY(-6px)). */
.cat-card--media.is-visible:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

/* Reduced motion: disable all entrance / reveal / transforms */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity:1 !important; transform:none !important; transition:none; }
  .hero--dark .eyebrow,.hero--dark h1,.hero--dark .lead,.hero--dark .hero-actions,.hero--dark .hero__play { animation:none !important; }
  .hero__bg { animation:none !important; }
  .btn--primary::after, .btn--ghost::after { transition: none; }
}
