/* =========================================================================
   Dinghui Packaging — global stylesheet
   Plain CSS, no build step. Design tokens live in :root.
   ========================================================================= */

:root {
  /* Brand palette */
  --ink:        #1b2b28;
  --ink-soft:   #2c3f3b;
  --brand:      #1f8a5b;
  --brand-dark: #14603f;
  --brand-tint: #e8f4ee;
  --kraft:      #c69a63;
  --kraft-tint: #f5eddd;
  --paper:      #fbfaf7;
  --card:       #ffffff;
  --muted:      #586863;
  --line:       #e6e3da;

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
               Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;

  /* Layout */
  --container: 1180px;
  --radius:   16px;
  --radius-sm: 10px;
  --shadow:   0 1px 2px rgba(20, 40, 35, .06), 0 12px 30px rgba(20, 40, 35, .08);
  --shadow-sm: 0 1px 2px rgba(20, 40, 35, .06), 0 6px 16px rgba(20, 40, 35, .06);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3, h4 { line-height: 1.18; letter-spacing: -.02em; color: var(--ink); font-weight: 700; }
h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p  { color: var(--ink-soft); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.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;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 999;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; text-decoration: none; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.section { padding-block: clamp(48px, 6vw, 88px); }
.section-tint { background: var(--kraft-tint); }
.section-ink { background: var(--ink); color: #dfe7e4; }
.section-ink h2, .section-ink h3 { color: #fff; }
.section-ink p { color: #c2d0cb; }

.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--brand-dark);
  margin-bottom: 12px;
}
.section-ink .eyebrow { color: #6fd3a3; }
.section-head { max-width: 62ch; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head.center { margin-inline: auto; text-align: center; }
.lead { font-size: 1.1rem; color: var(--muted); }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.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: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font: inherit; font-weight: 600; cursor: pointer;
  padding: 13px 22px; border-radius: 999px; border: 1.5px solid transparent;
  transition: transform .15s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn-ghost-light { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.25); }
.btn-ghost-light:hover { background: rgba(255,255,255,.18); }
.btn-sm { padding: 9px 16px; font-size: .92rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 250, 247, .82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; min-height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-size: 1.12rem; letter-spacing: -.02em; }
.brand-name-accent { color: var(--brand); }

.site-nav { margin-left: auto; }
.nav-menu { display: flex; align-items: center; gap: 4px; }
.nav-menu a {
  display: block; padding: 10px 14px; border-radius: 999px;
  color: var(--ink-soft); font-weight: 600; font-size: .98rem;
}
.nav-menu a:hover { color: var(--brand-dark); background: var(--brand-tint); text-decoration: none; }
.nav-menu a.is-current { color: var(--brand-dark); background: var(--brand-tint); }
.header-cta { flex: none; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line);
  background: var(--card); border-radius: 12px; cursor: pointer; padding: 0;
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--ink);
  border-radius: 2px; transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.nav-toggle span::before { transform: translateY(-6px); }
.nav-toggle span::after  { transform: translateY(4px); }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { transform: rotate(-45deg) translateY(-1px); }

@media (max-width: 860px) {
  .header-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-nav { margin-left: auto; }
  .nav-menu {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--card); border-bottom: 1px solid var(--line);
    padding: 8px 20px 16px; box-shadow: var(--shadow);
    display: none;
  }
  .nav-menu.is-open { display: flex; }
  .nav-menu a { padding: 14px 12px; border-radius: 10px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(60% 60% at 85% 0%, var(--brand-tint) 0%, transparent 60%),
    radial-gradient(50% 50% at 0% 100%, var(--kraft-tint) 0%, transparent 55%);
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center;
  padding-block: clamp(44px, 6vw, 84px);
}
.hero h1 { margin-bottom: 18px; }
.hero p.lead { margin-bottom: 28px; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px 18px; color: var(--muted); font-size: .92rem; font-weight: 600; }
.hero-badges li { display: flex; align-items: center; gap: 7px; }
.hero-badges svg { width: 18px; height: 18px; color: var(--brand); flex: none; }
.hero-visual {
  border-radius: 24px; overflow: hidden; box-shadow: var(--shadow);
  background: var(--card); border: 1px solid var(--line);
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-visual { order: -1; }
}

/* ---------- Stat bar ---------- */
.statbar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.statbar .stat-num { font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem); font-weight: 800; color: var(--brand-dark); letter-spacing: -.03em; }
.statbar .stat-label { color: var(--muted); font-size: .92rem; font-weight: 600; }
@media (max-width: 620px) { .statbar { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; } }

/* ---------- Cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #d7d3c6; }
.card-media { aspect-ratio: 4 / 3; background: var(--kraft-tint); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { font-size: 1.08rem; }
.card-body p { font-size: .95rem; color: var(--muted); }
.card-link {
  margin-top: auto; padding-top: 6px; font-weight: 700; font-size: .92rem;
  color: var(--brand-dark); display: inline-flex; align-items: center; gap: 6px;
}
.card:hover .card-link { gap: 10px; }

/* Feature (icon) cards */
.feature { padding: 26px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.feature .ficon {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand-tint); color: var(--brand-dark); margin-bottom: 14px;
}
.feature .ficon svg { width: 24px; height: 24px; }
.feature h3 { margin-bottom: 6px; }
.feature p { font-size: .95rem; color: var(--muted); }
.section-ink .feature { background: #223734; border-color: #2f4a45; }
.section-ink .feature .ficon { background: #17302b; color: #6fd3a3; }
.section-ink .feature p { color: #b7c6c1; }

/* Split section */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split-media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 28px; } }
.checklist li { position: relative; padding-left: 30px; margin-bottom: 12px; color: var(--ink-soft); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px;
  background: var(--brand-tint); border-radius: 6px;
}
.checklist li::after {
  content: ""; position: absolute; left: 6px; top: 8px; width: 8px; height: 5px;
  border-left: 2px solid var(--brand-dark); border-bottom: 2px solid var(--brand-dark);
  transform: rotate(-45deg);
}

/* Process steps */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.steps li { counter-increment: step; padding: 22px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.steps li::before {
  content: counter(step); display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff;
  font-weight: 800; margin-bottom: 12px;
}
.steps h3 { font-size: 1rem; margin-bottom: 4px; }
.steps p { font-size: .9rem; color: var(--muted); }
@media (max-width: 980px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* Industries */
.tags { display: flex; flex-wrap: wrap; gap: 12px; }
.tags li { padding: 10px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; font-weight: 600; font-size: .95rem; box-shadow: var(--shadow-sm); }

/* Logos / certs strip */
.certs { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 28px; }
.cert-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px;
  border: 1px dashed var(--line); border-radius: 12px; background: var(--card);
  font-weight: 700; color: var(--ink-soft); letter-spacing: .02em;
}
.cert-chip svg { width: 20px; height: 20px; color: var(--brand); }

/* CTA band */
.cta-band { background: linear-gradient(135deg, var(--brand-dark), var(--brand)); color: #fff; border-radius: var(--radius); padding: clamp(32px, 5vw, 56px); text-align: center; }
.cta-band h2 { color: #fff; margin-bottom: 10px; }
.cta-band p { color: #d9f0e6; margin-bottom: 24px; max-width: 54ch; margin-inline: auto; }
.cta-band .btn-primary { background: #fff; color: var(--brand-dark); }
.cta-band .btn-primary:hover { background: #eafaf2; }

/* Page hero (inner pages) */
.page-hero { background: var(--kraft-tint); border-bottom: 1px solid var(--line); }
.page-hero .container { padding-block: clamp(40px, 5vw, 66px); }
.page-hero h1 { margin-bottom: 12px; }
.page-hero p { max-width: 60ch; color: var(--muted); font-size: 1.08rem; }
.breadcrumb { font-size: .88rem; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand-dark); }
.breadcrumb span { margin-inline: 8px; }

/* Product category block */
.prodcat { scroll-margin-top: 90px; }
.prodcat + .prodcat { margin-top: clamp(40px, 5vw, 64px); }
.prodcat-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; margin-bottom: 22px; }
.prodcat-head h2 { font-size: 1.6rem; }
.prodcat-head p { color: var(--muted); }
.spec-list { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 4px; }
.spec-list li { font-size: .8rem; font-weight: 600; color: var(--brand-dark); background: var(--brand-tint); padding: 4px 10px; border-radius: 999px; }

/* Quick nav (chips) */
.chipnav { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.chipnav a { padding: 8px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 600; font-size: .9rem; color: var(--ink-soft); }
.chipnav a:hover { border-color: var(--brand); color: var(--brand-dark); text-decoration: none; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 28px; } }
.contact-list li { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-list li:last-child { border-bottom: 0; }
.contact-list .ci {
  width: 42px; height: 42px; flex: none; border-radius: 10px; display: grid; place-items: center;
  background: var(--brand-tint); color: var(--brand-dark);
}
.contact-list .ci svg { width: 20px; height: 20px; }
.contact-list dt { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.contact-list dd { font-size: 1.02rem; color: var(--ink); }
.contact-list dd a { color: var(--ink); }

.form-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 3vw, 32px); box-shadow: var(--shadow-sm); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
.field .req { color: #b23b3b; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-tint);
}
.field textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.form-status { margin-top: 14px; font-weight: 600; }
.form-status[data-state="ok"]  { color: var(--brand-dark); }
.form-status[data-state="err"] { color: #b23b3b; }

/* FAQ */
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 20px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--brand); line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding-bottom: 18px; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #b7c6c1; padding-block: 56px 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 36px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 14px; }
.site-footer a { color: #b7c6c1; }
.site-footer a:hover { color: #fff; }
.site-footer .brand-name { color: #fff; }
.footer-about p { font-size: .95rem; margin-top: 12px; max-width: 40ch; }
.footer-links li { margin-bottom: 9px; font-size: .95rem; }
.footer-contact li { margin-bottom: 9px; font-size: .95rem; }
.footer-bottom {
  border-top: 1px solid #2f4a45; margin-top: 40px; padding-top: 22px;
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between;
  font-size: .86rem; color: #8ea59f;
}

/* Back to top */
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); display: grid; place-items: center;
  box-shadow: var(--shadow); cursor: pointer; opacity: 0; visibility: hidden;
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
}
.to-top.show { opacity: 1; visibility: visible; }
.to-top:hover { transform: translateY(-2px); color: var(--brand-dark); }

/* Utility */
.text-center { text-align: center; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.stack-sm > * + * { margin-top: 10px; }
