/* ==========================================================================
   Jollytron — international trade & packaging group
   ========================================================================== */

:root {
  --navy-900: #0b2646;
  --navy-800: #0f3462;
  --navy-700: #14468a;
  --navy-600: #1a58ac;
  --navy-050: #eef4fb;
  --amber-500: #e08a2c;
  --amber-600: #c8741d;
  --ink: #16202e;
  --slate-600: #4d5967;
  --slate-400: #8792a0;
  --line: #e2e8f0;
  --paper: #ffffff;
  --paper-alt: #f5f8fc;
  --shadow-sm: 0 1px 2px rgba(11, 38, 70, 0.07);
  --shadow-md: 0 10px 26px rgba(11, 38, 70, 0.10);
  --shadow-lg: 0 24px 56px rgba(11, 38, 70, 0.16);
  --r-lg: 18px;
  --r-md: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { max-width: 100%; overflow-x: hidden; }

html[data-lang="en"] .zh { display: none !important; }
html[data-lang="zh"] .en { display: none !important; }

body {
  margin: 0;
  font-family: "Manrope", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.01em; }
p { margin: 0; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--navy-800); color: #fff; padding: 10px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--navy-700), var(--navy-600));
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { box-shadow: var(--shadow-lg); }
.btn-ghost-light {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}
.btn-ghost-light:hover { background: rgba(255,255,255,0.16); }
.btn-sm { padding: 9px 20px; font-size: 0.85rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.brand { display: flex; align-items: center; }
.brand-mark { height: 40px; width: auto; }

.main-nav { display: flex; gap: 30px; }
.main-nav a {
  font-size: 0.92rem; font-weight: 600; color: var(--slate-600);
  transition: color .15s ease;
  white-space: nowrap;
}
.main-nav a:hover { color: var(--navy-700); }

.header-actions { display: flex; align-items: center; gap: 14px; }

.lang-toggle {
  display: flex; align-items: center; gap: 4px;
  background: var(--paper-alt); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 10px; cursor: pointer;
  font-size: 0.82rem; font-weight: 700; color: var(--slate-600);
}
.lang-toggle .lang-opt { padding: 2px 6px; border-radius: 999px; }
.lang-toggle .lang-opt.is-active { background: var(--navy-700); color: #fff; }
.lang-sep { color: var(--slate-400); }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--paper); cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; width: 18px; margin: 0 auto; background: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  padding: 120px 0 0;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;
}
.hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(11,38,70,0.88) 0%, rgba(11,38,70,0.82) 55%, rgba(11,38,70,0.95) 100%);
}
.hero-inner { position: relative; z-index: 2; max-width: 760px; padding-bottom: 76px; }
.eyebrow {
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.02em;
  color: #ffd39b; text-transform: uppercase; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.18; margin-bottom: 22px; }
.hero-sub { font-size: 1.05rem; color: rgba(255,255,255,0.86); max-width: 640px; margin-bottom: 34px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.stats-bar {
  position: relative; z-index: 2;
  background: rgba(9, 28, 53, 0.72);
  border-top: 1px solid rgba(255,255,255,0.14);
}
.stats-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 30px 24px;
}
.stat { display: flex; flex-direction: column; gap: 4px; text-align: center; border-left: 1px solid rgba(255,255,255,0.14); padding: 0 8px; }
.stat:first-child { border-left: none; }
.stat-num { font-size: 1.7rem; font-weight: 800; color: #fff; }
.stat-label { font-size: 0.78rem; color: rgba(255,255,255,0.72); line-height: 1.35; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--paper-alt); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.kicker {
  font-size: 0.82rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--amber-600); margin-bottom: 12px;
}
.kicker-light { color: #ffd39b; }
.section-head h2 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); color: var(--navy-900); }
.section-desc { margin-top: 14px; color: var(--slate-600); font-size: 1.02rem; }
.sub-title { font-size: 1.2rem; color: var(--navy-900); margin-bottom: 26px; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: start; margin-bottom: 64px; }
.about-copy p { color: var(--slate-600); margin-bottom: 18px; font-size: 1.02rem; }
.about-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.about-photo-card {
  margin: 0; border-radius: var(--r-md); overflow: hidden; background: var(--paper-alt);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.about-photo-card img { width: 100%; height: 180px; object-fit: cover; }
.about-photo-card figcaption { padding: 12px 14px; font-size: 0.82rem; color: var(--slate-600); font-weight: 600; }

.affiliate-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.affiliate-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px; box-shadow: var(--shadow-sm);
}
.affiliate-date { display: inline-block; font-size: 0.76rem; font-weight: 700; color: var(--navy-600); background: var(--navy-050); padding: 4px 10px; border-radius: 999px; margin-bottom: 14px; }
.affiliate-card h3 { font-size: 1.02rem; color: var(--navy-900); margin-bottom: 10px; line-height: 1.35; }
.affiliate-card p { font-size: 0.9rem; color: var(--slate-600); }

/* ---------- Org chart ---------- */
.org-chart { display: flex; flex-direction: column; align-items: center; }
.org-node {
  background: var(--navy-800); color: #fff; font-weight: 700; padding: 14px 30px;
  border-radius: var(--r-md); box-shadow: var(--shadow-md); font-size: 0.98rem;
}
.org-node.org-mid { background: var(--navy-700); }
.org-stem { width: 2px; height: 28px; background: var(--line); }
.org-stem-wide { width: 2px; height: 28px; background: var(--line); margin-bottom: 4px; }
.org-branches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; width: 100%; margin-top: 8px; }
.org-branch {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 22px; text-align: center; box-shadow: var(--shadow-sm);
  position: relative;
}
.org-branch::before {
  content: ""; position: absolute; top: -32px; left: 50%; width: 1px; height: 32px; background: var(--line);
}
.org-company { font-weight: 700; color: var(--navy-900); font-size: 0.92rem; margin-bottom: 16px; min-height: 44px; }
.org-depts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.org-depts span { background: var(--navy-050); color: var(--navy-700); font-size: 0.76rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; }

/* ---------- Timeline ---------- */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 60px; }
.timeline-item { display: flex; flex-direction: column; gap: 14px; }
.timeline-year {
  font-size: 1.6rem; font-weight: 800; color: var(--navy-700);
}
.timeline-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px; box-shadow: var(--shadow-sm); flex: 1;
  border-top: 3px solid var(--amber-500);
}
.timeline-card h4 { font-size: 0.95rem; color: var(--navy-900); margin-bottom: 8px; line-height: 1.35; }
.timeline-card p { font-size: 0.85rem; color: var(--slate-600); }

.planning-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.planning-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px; box-shadow: var(--shadow-sm);
}
.planning-icon { font-size: 0.82rem; font-weight: 800; color: var(--amber-600); margin-bottom: 12px; }
.planning-card h4 { font-size: 1.02rem; color: var(--navy-900); margin-bottom: 10px; }
.planning-card p { font-size: 0.88rem; color: var(--slate-600); }

/* ---------- Equipment ---------- */
.equip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.equip-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, transform .2s ease;
}
.equip-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.equip-img { height: 170px; background: var(--paper-alt); display: flex; align-items: center; justify-content: center; padding: 14px; }
.equip-img img { max-height: 100%; object-fit: contain; }
.equip-body { padding: 20px 22px 24px; }
.equip-body h4 { font-size: 0.98rem; color: var(--navy-900); margin-bottom: 14px; line-height: 1.3; }
.equip-body h4 small { font-weight: 600; color: var(--slate-400); }
.spec-list li {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 0.82rem; padding: 7px 0; border-top: 1px dashed var(--line);
  color: var(--slate-600);
}
.spec-list li:first-child { border-top: none; }
.spec-list b { color: var(--navy-800); font-weight: 700; text-align: right; }

/* ---------- Quality ---------- */
.test-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-bottom: 44px; }
.test-card {
  display: grid; grid-template-columns: 130px 1fr; gap: 18px; align-items: center;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px; box-shadow: var(--shadow-sm);
}
.test-card img { width: 100%; height: 110px; object-fit: contain; }
.test-card h4 { font-size: 1rem; color: var(--navy-900); margin-bottom: 8px; }
.test-card p { font-size: 0.86rem; color: var(--slate-600); margin-bottom: 10px; }
.std-tag {
  display: inline-block; font-size: 0.74rem; font-weight: 700; color: var(--navy-700);
  background: var(--navy-050); padding: 4px 10px; border-radius: 999px;
}

.cert-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.cert-card {
  margin: 0; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
  background: var(--paper); box-shadow: var(--shadow-sm);
}
.cert-card img { width: 100%; height: 220px; object-fit: cover; object-position: top; }
.cert-card figcaption { padding: 12px 14px; font-size: 0.78rem; font-weight: 700; color: var(--navy-800); line-height: 1.35; }

/* ---------- Products ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.product-card {
  margin: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  background: var(--paper); box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, transform .2s ease;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.product-card img { width: 100%; height: 190px; object-fit: cover; }
.product-card figcaption { padding: 14px 16px; font-size: 0.85rem; font-weight: 700; color: var(--navy-900); }

/* ---------- Clients ---------- */
.logo-wall {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px;
}
.logo-item {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md);
  height: 96px; display: flex; align-items: center; justify-content: center; padding: 18px;
  box-shadow: var(--shadow-sm);
}
.logo-item img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ---------- Vision / CTA ---------- */
.vision { position: relative; padding: 110px 0; color: #fff; overflow: hidden; }
.vision-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.vision-scrim { position: absolute; inset: 0; z-index: 1; background: linear-gradient(120deg, rgba(9,28,53,0.94), rgba(20,70,138,0.86)); }
.vision-content { position: relative; z-index: 2; max-width: 760px; }
.vision-content h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.35; margin-bottom: 22px; }
.vision-copy { color: rgba(255,255,255,0.86); font-size: 1rem; margin-bottom: 32px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.contact-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 24px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 8px;
}
.contact-label { font-size: 0.78rem; font-weight: 700; color: var(--slate-400); text-transform: uppercase; letter-spacing: 0.04em; }
.contact-value { font-size: 1.05rem; font-weight: 700; color: var(--navy-900); }
a.contact-value:hover { color: var(--navy-600); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 34px 0; background: var(--paper-alt); }
.footer-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.footer-copy { font-size: 0.82rem; color: var(--slate-400); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-photos { grid-template-columns: 1fr 1fr; max-width: 460px; }
  .cert-grid { grid-template-columns: repeat(3, 1fr); }
  .logo-wall { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); row-gap: 22px; }
  .stat:nth-child(4) { border-left: none; }
  .affiliate-grid { grid-template-columns: 1fr; }
  .org-branches { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .planning-grid { grid-template-columns: repeat(2, 1fr); }
  .equip-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }

  .site-header { position: sticky; }
  .header-actions .btn-primary { display: none; }
  .main-nav.is-open {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 76px; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px 24px 18px; box-shadow: var(--shadow-md);
  }
  .main-nav.is-open a { padding: 12px 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: none; }
  .test-cards { grid-template-columns: 1fr; }
  .test-card { grid-template-columns: 90px 1fr; }
  .cert-grid { grid-template-columns: repeat(2, 1fr); }
  .logo-wall { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: 1fr; }
  .planning-grid { grid-template-columns: 1fr; }
  .equip-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 100px; }
}
