/* ============================================================
   Jinjin Metal — Precision Metal Manufacturing · Site Stylesheet
   Responsive, mobile-first. Industrial / professional theme.
   ============================================================ */

:root {
  --navy-950: #07121f;
  --navy-900: #0a1a2f;
  --navy-800: #0f2438;
  --navy-700: #16324b;
  --steel-600: #2f4b6b;
  --steel-500: #4a6a8a;
  --steel-400: #7a93aa;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --accent: #f59e0b;
  --accent-600: #d97706;
  --accent-soft: #fef3c7;
  --teal: #0ea5e9;
  --text: #1e293b;
  --text-muted: #5b6b7f;
  --white: #ffffff;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 4px 20px rgba(10, 26, 47, 0.08);
  --shadow-lg: 0 16px 48px rgba(10, 26, 47, 0.16);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --maxw: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; color: var(--navy-900); }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }

.section { padding: 80px 0; }
.section--tint { background: var(--slate-50); }
.section--navy { background: var(--navy-900); color: var(--white); }
.section--navy h2, .section--navy h3 { color: var(--white); }

.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-600);
  margin-bottom: 12px;
}
.section-head p.lead { color: var(--text-muted); font-size: 1.08rem; margin-top: 14px; }
.section--navy .section-head p.lead { color: var(--slate-300); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem; line-height: 1;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-accent { background: var(--accent); color: #3b2404; box-shadow: 0 6px 18px rgba(245, 158, 11, .35); }
.btn-accent:hover { background: var(--accent-600); color: #fff; }
.btn-navy { background: var(--navy-800); color: #fff; }
.btn-navy:hover { background: var(--navy-700); }
.btn-outline { border-color: var(--slate-300); color: var(--navy-800); background: #fff; }
.btn-outline:hover { border-color: var(--navy-800); }
.btn-ghost-light { border-color: rgba(255,255,255,.35); color: #fff; }
.btn-ghost-light:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-lg { padding: 15px 28px; font-size: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--slate-200);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 40px; height: 40px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--navy-800), var(--steel-600));
  color: #fff; border-radius: 10px; font-weight: 800; font-size: 1.05rem;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.12);
}
.brand-text strong { display: block; font-size: 1.02rem; letter-spacing: 0.02em; color: var(--navy-900); line-height: 1.1; }
.brand-text small { display: block; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.main-nav a {
  padding: 8px 14px; border-radius: 8px;
  font-weight: 500; font-size: 0.94rem; color: var(--text-muted);
  transition: color .15s ease, background .15s ease;
}
.main-nav a:hover { color: var(--navy-900); background: var(--slate-100); }
.main-nav a.active { color: var(--navy-900); background: var(--slate-100); font-weight: 600; }
.header-cta { margin-left: 8px; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--navy-900); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1000px 600px at 85% -10%, rgba(14,165,233,.18), transparent 60%),
    radial-gradient(800px 500px at -10% 110%, rgba(245,158,11,.16), transparent 55%),
    linear-gradient(180deg, var(--navy-950), var(--navy-800));
  color: #fff; padding: 96px 0 88px;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 48px 48px;
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero .eyebrow { color: var(--accent); }
.hero h1 { color: #fff; margin-bottom: 20px; }
.hero h1 span { color: var(--accent); }
.hero p.lead { color: var(--slate-300); font-size: 1.12rem; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 34px; margin-top: 44px; }
.hero-stat strong { display: block; font-size: 1.9rem; font-weight: 800; color: #fff; }
.hero-stat span { font-size: 0.86rem; color: var(--slate-300); }

.hero-visual {
  position: relative;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-lg);
}
.hero-visual .chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.hero-visual .chip {
  font-size: 0.82rem; font-weight: 600; padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); color: var(--slate-100);
}
.hero-visual .cap-list { display: grid; gap: 12px; }
.hero-visual .cap {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: rgba(255,255,255,.05); border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
}
.hero-visual .cap .ic { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; background: rgba(245,158,11,.18); color: var(--accent); }
.hero-visual .cap strong { display: block; color: #fff; font-size: 0.98rem; }
.hero-visual .cap span { color: var(--slate-300); font-size: 0.82rem; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-lg);
  padding: 26px; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card .ic {
  width: 50px; height: 50px; display: grid; place-items: center; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent-600); margin-bottom: 18px;
}
.card h3 { margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Products ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; justify-content: center; }
.filter-btn {
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--slate-300);
  background: #fff; color: var(--text-muted); font-weight: 600; font-size: 0.9rem; cursor: pointer;
  transition: all .15s ease;
}
.filter-btn:hover { border-color: var(--navy-800); color: var(--navy-900); }
.filter-btn.active { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }

.product-card { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.product-thumb {
  aspect-ratio: 4 / 3; display: grid; place-items: center; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--slate-100), var(--slate-200));
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-thumb .ph { display: grid; place-items: center; text-align: center; padding: 20px; color: var(--steel-500); }
.product-thumb .ph svg { width: 44px; height: 44px; margin: 0 auto 10px; opacity: .6; }
.product-thumb .ph span { font-size: 0.85rem; font-weight: 600; }
.product-tag {
  position: absolute; top: 12px; left: 12px; font-size: 0.72rem; font-weight: 700;
  padding: 5px 11px; border-radius: 999px; background: rgba(10,26,47,.82); color: #fff; letter-spacing: .02em;
}
.product-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product-body h3 { font-size: 1.08rem; }
.product-body p { color: var(--text-muted); font-size: 0.9rem; flex: 1; }
.product-link { font-weight: 600; font-size: 0.9rem; color: var(--accent-600); display: inline-flex; align-items: center; gap: 5px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }

/* ---------- Capabilities ---------- */
.cap-card { border-left: 3px solid var(--accent); }
.cap-card .list { margin-top: 14px; display: grid; gap: 8px; }
.cap-card .list li { display: flex; gap: 8px; font-size: 0.9rem; color: var(--text-muted); }
.cap-card .list li::before { content: "✓"; color: var(--teal); font-weight: 700; flex: 0 0 auto; }

.spec-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.spec-item { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 18px; }
.spec-item strong { display: block; color: #fff; font-size: 1.05rem; margin-bottom: 4px; }
.spec-item span { color: var(--slate-300); font-size: 0.86rem; }

/* ---------- Process steps ---------- */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 64px; margin-bottom: 30px; }
.step:last-child { margin-bottom: 0; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 12px;
  background: var(--navy-800); color: var(--accent); font-weight: 800; font-size: 1.1rem;
  display: grid; place-items: center;
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band h2 { color: #fff; margin-bottom: 14px; }
.cta-band p { color: var(--slate-300); max-width: 560px; margin: 0 auto 28px; }

/* ---------- Contact / form ---------- */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 40px; align-items: start; }
.info-list { display: grid; gap: 20px; margin-top: 8px; }
.info-item { display: flex; gap: 14px; align-items: flex-start; }
.info-item .ic { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent-600); }
.info-item strong { display: block; font-size: 0.92rem; color: var(--navy-900); }
.info-item a, .info-item span { color: var(--text-muted); font-size: 0.92rem; word-break: break-word; }

.form-card { background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 0.88rem; color: var(--navy-900); margin-bottom: 7px; }
.field label .req { color: #e11d48; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--slate-300); border-radius: 10px;
  font-family: inherit; font-size: 0.95rem; color: var(--text); background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--navy-800); box-shadow: 0 0 0 3px rgba(22,50,75,.12);
}
.field textarea { resize: vertical; min-height: 120px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-note { font-size: 0.82rem; color: var(--text-muted); margin-top: 14px; }
.form-msg { display: none; margin-top: 16px; padding: 14px 16px; border-radius: 10px; font-size: 0.92rem; font-weight: 500; }
.form-msg.success { display: block; background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.form-msg.error { display: block; background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: var(--slate-300); padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; padding-bottom: 44px; }
.footer-col h4 { color: #fff; margin-bottom: 16px; font-size: 0.95rem; letter-spacing: .04em; text-transform: uppercase; }
.footer-col a, .footer-col p { display: block; color: var(--slate-300); font-size: 0.92rem; margin-bottom: 10px; }
.footer-col a:hover { color: var(--accent); }
.footer-col .brand .brand-text strong { color: #fff; }
.footer-col .brand .brand-text small { color: var(--slate-300); }
.footer-desc { margin-top: 14px; color: var(--slate-300); font-size: 0.9rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 20px 0; }
.footer-bottom .container { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.footer-bottom p { font-size: 0.84rem; color: var(--slate-400); }

/* ---------- Page hero (subpages) ---------- */
.page-hero {
  background: linear-gradient(180deg, var(--navy-950), var(--navy-800));
  color: #fff; padding: 72px 0 64px; position: relative; overflow: hidden;
}
.page-hero .eyebrow { color: var(--accent); }
.page-hero h1 { color: #fff; }
.page-hero p { color: var(--slate-300); max-width: 640px; margin-top: 14px; font-size: 1.06rem; }
.breadcrumb { font-size: 0.82rem; color: var(--slate-400); margin-top: 16px; }
.breadcrumb a { color: var(--slate-300); }
.breadcrumb a:hover { color: var(--accent); }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gallery figure { position: relative; overflow: hidden; border-radius: 14px; border: 1px solid var(--slate-200); background: var(--slate-100); }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .25s ease; }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption { padding: 10px 14px; font-size: 0.86rem; font-weight: 600; color: var(--navy-800); background: #fff; }
.cert-figure img { width: 100%; border-radius: 14px; border: 1px solid var(--slate-200); box-shadow: var(--shadow); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 560px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .section { padding: 60px 0; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .nav-toggle { display: flex; margin-left: auto; }
  .header-cta { display: none; }
  .main-nav {
    position: fixed; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; border-bottom: 1px solid var(--slate-200);
    padding: 12px 20px 20px; box-shadow: var(--shadow-lg);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .2s ease, opacity .2s ease;
  }
  .main-nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .main-nav a { padding: 12px 14px; font-size: 1rem; }
  .field-row { grid-template-columns: 1fr; }
  .hero { padding: 64px 0; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .spec-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 22px; }
}
