/* ==========================================================================
   Jowin Machinery (Zhangjiagang) Co., Ltd. — Site Stylesheet
   Palette sampled directly from the company logo:
     red   #C5000B
     black #000000
   ========================================================================== */

:root {
  --red: #c5000b;
  --red-dark: #96000a;
  --black: #101010;
  --ink: #1c1c1c;
  --muted: #656565;
  --line: #e7e5e3;
  --bg: #ffffff;
  --bg-alt: #f6f5f3;
  --bg-dark: #161616;
  --bg-dark-alt: #1f1f1f;
  --radius: 10px;
  --container: 1180px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

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

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 16px; color: var(--ink); }
.muted { color: var(--muted); }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 10px;
}

.section {
  padding: 88px 0;
}
.section-alt { background: var(--bg-alt); }
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}
.section-head p { margin-bottom: 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-black { background: var(--black); color: #fff; }
.btn-black:hover { background: #000; }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.55); }
.btn-outline:hover { border-color: #fff; }
.btn-outline-dark { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline-dark:hover { background: var(--ink); color: #fff; }
.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--red);
  text-transform: uppercase;
}
.btn-link svg { width: 14px; height: 14px; transition: transform 0.15s ease; }
.btn-link:hover svg { transform: translateX(3px); }

/* ==========================================================================
   Header / Nav
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { height: 46px; width: auto; }
.brand-text {
  font-weight: 800;
  font-size: 0.98rem;
  color: var(--ink);
  line-height: 1.15;
}
.brand-text span { display: block; font-weight: 500; font-size: 0.68rem; color: var(--muted); letter-spacing: 0.04em; }

.main-nav { display: flex; align-items: center; gap: 34px; }
.main-nav a {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  position: relative;
  padding: 6px 0;
}
.main-nav a:hover { color: var(--red); }
.main-nav a.is-active { color: var(--red); }
.main-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 2px;
  background: var(--red);
}
.nav-cta {
  background: var(--red);
  color: #fff !important;
  padding: 10px 22px;
  border-radius: 999px;
}
.nav-cta:hover { background: var(--red-dark) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  background: linear-gradient(150deg, var(--bg-dark) 0%, #000 100%);
  color: #fff;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
  padding: 110px 0 100px;
  position: relative;
  z-index: 2;
}
.hero h1 { color: #fff; margin-bottom: 20px; }
.hero .eyebrow { color: #ff5b63; }
.hero p.lead {
  color: rgba(255,255,255,0.72);
  font-size: 1.08rem;
  max-width: 480px;
  margin-bottom: 34px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-art {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-art svg { width: 100%; max-width: 420px; height: auto; }

.hero-strip {
  position: absolute;
  right: -120px;
  top: -120px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(197,0,11,0.35), transparent 70%);
  z-index: 1;
}

/* Stats bar */
.stats {
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 40px 0;
}
.stat { text-align: center; padding: 12px 10px; }
.stat-num {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--red);
  letter-spacing: -0.02em;
}
.stat-label {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
  margin-top: 4px;
}

/* ==========================================================================
   About split
   ========================================================================== */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.split-media {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  color: var(--muted);
  overflow: hidden;
}
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.split-media svg { width: 56px; height: 56px; opacity: 0.35; }
.placeholder-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: #fff3cd;
  color: #8a6100;
  border: 1px solid #f0d998;
  padding: 4px 10px;
  border-radius: 999px;
}
.split.reverse { grid-template-columns: 1fr 1fr; }
.split.reverse .split-media { order: 2; }
.split.reverse .split-copy { order: 1; }

/* ==========================================================================
   Cards / Products grid
   ========================================================================== */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 28px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: 0 16px 40px rgba(0,0,0,0.08); transform: translateY(-3px); }
.card-photo {
  aspect-ratio: 4/3;
  border-radius: calc(var(--radius) - 4px);
  overflow: hidden;
  margin: -34px -28px 20px;
  background: var(--bg-alt);
}
.card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}
.card-icon svg { width: 30px; height: 30px; }
.card h3 { margin-bottom: 8px; }
.card p { font-size: 0.93rem; margin-bottom: 18px; }

/* Product detail cards (products page) */
.product-card {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
  scroll-margin-top: 100px;
}
.product-card .split-media { aspect-ratio: 1/1; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag {
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--ink);
}

/* Certifications */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.cert-card {
  text-align: center;
  padding: 32px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}
.cert-badge {
  width: 72px; height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 2px solid var(--red);
  display: flex; align-items: center; justify-content: center;
  color: var(--red);
}
.cert-badge svg { width: 34px; height: 34px; }
.cert-card h3 { font-size: 1rem; margin-bottom: 6px; }
.cert-card p { font-size: 0.85rem; }

/* ==========================================================================
   Contact split panel (dark/red)
   ========================================================================== */
.contact-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}
.contact-panel-left {
  background: var(--bg-alt);
  padding: 72px 56px;
}
.contact-panel-right {
  background: var(--red);
  color: #fff;
  padding: 72px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.contact-panel-right h2 { color: #fff; }
.contact-panel-right p { color: rgba(255,255,255,0.85); }
.contact-panel-right .btn-outline { color: #fff; }
.info-row { display: flex; gap: 14px; margin-bottom: 22px; align-items: flex-start; }
.info-row svg { width: 22px; height: 22px; color: var(--red); flex-shrink: 0; margin-top: 3px; }
.info-row strong { display: block; margin-bottom: 2px; }
.panel-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }

/* ==========================================================================
   Page banner (inner pages)
   ========================================================================== */
.page-banner {
  background: var(--bg-dark);
  color: #fff;
  padding: 64px 0 56px;
}
.page-banner h1 { color: #fff; margin-bottom: 10px; }
.breadcrumb { font-size: 0.85rem; color: rgba(255,255,255,0.55); }
.breadcrumb a:hover { color: #fff; }

/* Facility figures */
.figure-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 40px 0;
}
.figure {
  border-left: 3px solid var(--red);
  padding-left: 16px;
}
.figure .num { font-size: 1.9rem; font-weight: 800; }
.figure .label { font-size: 0.85rem; color: var(--muted); }

/* Equipment list */
.list-check { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; }
.list-check li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.95rem; }
.list-check svg { width: 20px; height: 20px; color: var(--red); flex-shrink: 0; margin-top: 2px; }

/* ==========================================================================
   Contact page form
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
}
.form-field { margin-bottom: 20px; }
.form-field label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; }
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.95rem;
  background: var(--bg-alt);
}
.form-field textarea { resize: vertical; min-height: 130px; }
.form-note {
  background: #fff3cd;
  border: 1px solid #f0d998;
  color: #8a6100;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-top: 8px;
}
.map-box {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  aspect-ratio: 16/9;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  margin-top: 24px;
  text-align: center;
  padding: 20px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--bg-dark); color: rgba(255,255,255,0.75); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 40px;
  padding: 64px 0 40px;
}
.footer-mark { height: 40px; width: auto; margin-bottom: 14px; }
.footer-brand p { color: rgba(255,255,255,0.55); font-size: 0.88rem; }
.footer-brand p:first-of-type { color: #fff; font-weight: 700; font-size: 0.95rem; }
.social-links { display: flex; gap: 10px; margin-top: 18px; }
.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: #fff;
  transition: background 0.15s ease, color 0.15s ease;
}
.social-links a:hover { background: var(--red); color: #fff; }
.social-links svg { width: 17px; height: 17px; }
.footer-col h4 {
  color: #fff;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.footer-col a, .footer-col p {
  display: block;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 12px;
}
.footer-col a:hover { color: #fff; }
.footer-cta { color: var(--red) !important; font-weight: 700; margin-top: 6px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom a { color: rgba(255,255,255,0.45); }
.footer-bottom a:hover { color: #fff; }

/* ==========================================================================
   Blog
   ========================================================================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.blog-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.blog-card:hover { box-shadow: 0 16px 40px rgba(0,0,0,0.08); transform: translateY(-3px); }
.blog-card-media {
  aspect-ratio: 16/10;
  background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
}
.blog-card-media svg { width: 40px; height: 40px; opacity: 0.35; }
.blog-card-body { padding: 24px 26px 28px; flex: 1; display: flex; flex-direction: column; }
.blog-card-meta { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--red); margin-bottom: 10px; }
.blog-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.blog-card p { font-size: 0.9rem; color: var(--muted); flex: 1; }

.blog-empty {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
  padding: 40px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--bg-alt);
}
.blog-empty h3 { margin-bottom: 10px; }
.topic-list {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
  text-align: left;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.topic-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--ink);
}
.topic-list svg { width: 18px; height: 18px; color: var(--red); flex-shrink: 0; margin-top: 3px; }

.callout {
  background: var(--bg-alt);
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 28px 0;
}
.callout h4 { margin-bottom: 8px; font-size: 1rem; }
.callout p:last-child { margin-bottom: 0; }

/* Blog post article typography */
.blog-post-body { max-width: 720px; margin: 0 auto; }
.blog-post-body h2 { margin-top: 40px; }
.blog-post-body h3 { margin-top: 28px; }
.blog-post-body p { font-size: 1.02rem; line-height: 1.75; color: var(--ink); }
.blog-post-body ul, .blog-post-body ol { font-size: 1.02rem; line-height: 1.75; padding-left: 22px; margin-bottom: 16px; }
.blog-post-body li { margin-bottom: 6px; }
.blog-post-body img { border-radius: var(--radius); margin: 24px 0; }
.blog-post-body blockquote {
  border-left: 3px solid var(--red);
  margin: 24px 0;
  padding: 4px 0 4px 20px;
  font-style: italic;
  color: var(--muted);
}
.blog-post-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  margin-top: 4px;
}
.blog-post-cta {
  max-width: 720px;
  margin: 48px auto 0;
  padding: 28px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  text-align: center;
}

/* ==========================================================================
   Price tag
   ========================================================================== */
.price-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  margin: 10px 0 0;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--red);
}
.price-tag .price-note {
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--muted);
}
.price-disclaimer {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 8px;
}

/* ==========================================================================
   Spec tables (collapsible)
   ========================================================================== */
.spec-details {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.spec-details summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--red);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.spec-details summary::-webkit-details-marker { display: none; }
.spec-details summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  border: 1.5px solid var(--red);
  border-radius: 50%;
  font-size: 0.85rem;
  line-height: 1;
  flex-shrink: 0;
}
.spec-details[open] summary::before { content: "–"; }
.spec-table-wrap { overflow-x: auto; margin-top: 14px; }
.spec-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.82rem;
  white-space: nowrap;
}
.spec-table th, .spec-table td {
  border: 1px solid var(--line);
  padding: 8px 12px;
  text-align: left;
}
.spec-table th {
  background: var(--bg-alt);
  font-weight: 700;
  color: var(--ink);
}
.spec-table td:first-child {
  font-weight: 600;
  background: var(--bg-alt);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 60px; }
  .hero-art { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .split, .split.reverse { grid-template-columns: 1fr; }
  .split.reverse .split-media, .split.reverse .split-copy { order: initial; }
  .grid-3 { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .topic-list { grid-template-columns: 1fr; }
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-panel { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .figure-grid { grid-template-columns: repeat(2, 1fr); }
  .list-check { grid-template-columns: 1fr; }
  .product-card { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .main-nav {
    position: absolute;
    top: 76px; left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 26px;
    gap: 18px;
    display: none;
  }
  .main-nav.is-open { display: flex; }
  .nav-toggle { display: flex; }
  .nav-cta { margin-top: 6px; }
  .section { padding: 64px 0; }
  .contact-panel-left, .contact-panel-right { padding: 48px 24px; }
  .footer-grid { grid-template-columns: 1fr; padding: 48px 0 28px; }
  .cert-grid { grid-template-columns: 1fr; }
}
