/* ==========================================================================
   Shuangying Machinery — global stylesheet
   Palette: brand #1d4e89 · dark #163d6b · deep #0f2c50 · accent #2e7cd6
   ========================================================================== */

:root {
  --brand: #1d4e89;
  --brand-dark: #163d6b;
  --brand-deep: #0f2c50;
  --accent: #2e7cd6;
  --surface: #f4f6f9;
  --ink: #1a2233;
  --muted: #5a6472;
  --line: #e2e6ed;
  --white: #fff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(16, 42, 77, 0.1);
  --container: 1200px;
  --font-display: "Montserrat", "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", sans-serif;
  --font-body: "Inter", "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 4.4vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 600; }

p { margin: 0 0 1rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: none; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--brand); }
.btn-outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.45); }
.btn-ghost-light:hover { background: rgba(255,255,255,0.12); }
.btn-white { background: #fff; color: var(--brand); }
.btn-white:hover { background: #eef2f8; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
}
.logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text strong {
  font-family: var(--font-display);
  font-size: 1.02rem;
  letter-spacing: 0.08em;
  color: var(--brand);
}
.logo-text span {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav { display: flex; align-items: center; gap: 30px; }
.nav a {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 500;
  padding: 6px 0;
  position: relative;
}
.nav a:hover, .nav a.active { color: var(--accent); }
.nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* header CTA: break out of the plain nav-link styling */
.nav a.nav-cta {
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  color: #fff;
}
.nav a.nav-cta:hover { color: #fff; background: var(--brand); }
.nav a.nav-cta::after { content: none; }

.nav-dropdown { position: relative; }
.nav-dropdown > a::after {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  margin-left: 7px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}
.dropdown-panel {
  position: absolute;
  top: 100%;
  left: -18px;
  min-width: 268px;
  padding: 10px;
  margin-top: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: none;
}
.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel { display: block; }
.dropdown-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--ink);
}
.dropdown-panel a:hover { background: var(--surface); color: var(--accent); }

.menu-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.menu-toggle span {
  display: block;
  width: 18px; height: 2px;
  background: var(--ink);
  position: relative;
}
.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px; height: 2px;
  background: var(--ink);
}
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 8px 20px 20px;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block;
  padding: 12px 0;
  color: var(--ink);
  font-size: 0.98rem;
  border-bottom: 1px solid #f1f3f7;
}
.mobile-nav .mobile-label {
  margin: 14px 0 4px;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.mobile-nav a.sub { padding-left: 14px; color: var(--muted); font-size: 0.92rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 74vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--brand-deep);
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(15,44,80,0.94) 0%, rgba(15,44,80,0.8) 42%, rgba(15,44,80,0.28) 100%);
}
.hero-content { position: relative; z-index: 2; padding: 110px 0; max-width: 720px; }
.hero-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #b9c9dd;
  margin-bottom: 18px;
}
.hero h1 { color: #fff; }
.hero-sub {
  margin-top: 20px;
  font-size: 1.12rem;
  color: #d5dfeb;
  max-width: 560px;
  line-height: 1.7;
}
.hero-actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Stats ---------- */
.stats { border-bottom: 1px solid var(--line); background: #fff; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 34px 0;
  text-align: center;
}
.stat-value {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 700;
  color: var(--brand);
  line-height: 1.1;
}
.stat-label { margin-top: 6px; font-size: 0.88rem; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: 92px 0; }
.section.surface { background: var(--surface); }
.section.tight { padding: 64px 0; }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 52px; }
.section-head.left { text-align: left; margin-left: 0; }
.section-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
}
.section-rule {
  width: 62px; height: 4px;
  background: var(--accent);
  border-radius: 3px;
  margin: 18px auto 0;
}
.section-head.left .section-rule { margin-left: 0; }

/* ---------- 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(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.card:hover .card-media img { transform: scale(1.05); }
.card-body { padding: 20px 22px 24px; }
.card-body p { font-size: 0.93rem; color: var(--muted); margin: 8px 0 0; }
.card-link { display: inline-block; margin-top: 14px; font-size: 0.9rem; font-weight: 600; color: var(--accent); }

.card-cta {
  background: var(--brand);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 36px 26px;
  border: none;
}
.card-cta h3 { color: #fff; font-size: 1.2rem; }
.card-cta p { color: #c3d2e4; font-size: 0.92rem; margin: 10px 0 0; }
.card-cta svg { margin-bottom: 14px; }
.card-cta:hover { background: var(--brand-dark); transform: translateY(-4px); }

/* Product tiles */
.tile-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tile {
  border: none;
  padding: 0;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 0.35s ease; }
.tile:hover img { transform: scale(1.05); }

/* ---------- About split ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split img { border-radius: var(--radius); box-shadow: var(--shadow); }

.brand-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.brand-chip {
  padding: 8px 14px;
  border: 1px solid #d4dbe6;
  border-radius: 8px;
  background: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ---------- Capability cards ---------- */
.cap-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.cap-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.cap-icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: rgba(46,124,214,0.1);
  color: var(--accent);
  margin-bottom: 18px;
}
.cap-card h3 { margin-bottom: 8px; }
.cap-card p { font-size: 0.92rem; color: var(--muted); margin: 0; }

/* ---------- Process steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.step-num {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.step h3 { margin: 8px 0 8px; }
.step p { font-size: 0.9rem; color: var(--muted); margin: 0; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.faq-item + .faq-item { border-top: 1px solid var(--line); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.faq-q:hover { color: var(--accent); }
.faq-q svg { flex: 0 0 auto; transition: transform 0.25s ease; color: var(--accent); }
.faq-item.open .faq-q svg { transform: rotate(180deg); }
.faq-a { display: none; padding: 0 24px 22px; color: var(--muted); font-size: 0.94rem; }
.faq-item.open .faq-a { display: block; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--brand-deep); padding: 76px 0; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band .section-eyebrow, .page-hero .section-eyebrow { color: #8fbdec; }
.cta-band p { color: #c9d5e4; max-width: 640px; margin: 16px auto 0; }
.cta-actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.cta-contact {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.22);
  color: #fff;
  font-weight: 600;
  font-size: 0.96rem;
}
.cta-contact:hover { background: rgba(255,255,255,0.16); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { background: var(--brand-deep); padding: 64px 0 68px; }
.page-hero h1 { color: #fff; font-size: clamp(1.8rem, 3.4vw, 2.9rem); }
.page-hero p { color: #c9d5e4; margin-top: 16px; max-width: 700px; }
.breadcrumb { font-size: 0.78rem; color: #8fa3bd; margin-bottom: 16px; }
.breadcrumb a { color: #8fa3bd; }
.breadcrumb a:hover { color: #fff; }

/* ---------- Filter pills ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 40px; }
.filter-btn {
  padding: 10px 20px;
  border-radius: 999px;
  border: 2px solid #d6dde7;
  background: #fff;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}
.filter-btn:hover { border-color: var(--brand); color: var(--brand); }
.filter-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.empty-note { display: none; text-align: center; padding: 70px 0; color: var(--muted); }
.empty-note.show { display: block; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8, 15, 26, 0.9);
  padding: 20px;
}
.lightbox.open { display: flex; }
.lightbox figure { margin: 0; max-width: 1000px; text-align: center; }
.lightbox img { max-height: 78vh; width: auto; margin: 0 auto; border-radius: 10px; }
.lightbox figcaption { color: #c3cfe0; font-size: 0.86rem; margin-top: 14px; }
.lb-btn {
  position: absolute;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  width: 46px; height: 46px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.lb-btn:hover { background: rgba(255,255,255,0.22); }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: start; }
.demo-note {
  display: flex;
  gap: 10px;
  padding: 14px 18px;
  background: #fff8e6;
  border: 1px solid #f0d68a;
  border-radius: var(--radius-sm);
  color: #7a5a12;
  font-size: 0.9rem;
}
.form-field { margin-top: 20px; }
.form-field label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 7px; }
.form-field label .req { color: #d64545; }
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid #d6dde7;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(46,124,214,0.15);
}
.form-field .err { display: none; margin-top: 6px; font-size: 0.8rem; color: #d64545; }
.form-field.invalid input,
.form-field.invalid textarea { border-color: #e08a8a; }
.form-field.invalid .err { display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-success {
  display: none;
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: #eaf7ee;
  border: 1px solid #a8d8b5;
  color: #1e6b34;
  font-size: 0.92rem;
}
.form-success.show { display: block; }

.info-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  margin-bottom: 16px;
  color: var(--ink);
}
.info-card:hover { box-shadow: var(--shadow); }
.info-card svg { flex: 0 0 auto; color: var(--accent); margin-top: 2px; }
.info-card .label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}
.info-card .value { font-weight: 600; font-size: 0.98rem; word-break: break-word; }
.info-card .sub { display: block; font-size: 0.85rem; color: var(--muted); margin-top: 3px; font-weight: 400; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-deep); color: #b9c7d8; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 48px;
  padding: 64px 0 52px;
}
.footer-brand strong {
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: #fff;
  display: block;
}
.footer-brand .sub {
  display: block;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7f93ab;
  margin-top: 4px;
}
.footer-brand p { font-size: 0.92rem; line-height: 1.7; margin-top: 16px; }
.footer-slogan { color: #dbe4ef; font-weight: 500; margin-top: 14px; font-size: 0.92rem; }
.footer-col h4 {
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 16px;
  font-weight: 600;
}
.footer-col a,
.footer-col span { display: block; font-size: 0.9rem; color: #b9c7d8; padding: 5px 0; }
.footer-col a:hover { color: #fff; }
.footer-col .label {
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7f93ab;
  margin-top: 12px;
}
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); }
.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 20px;
  font-size: 0.78rem;
  color: #8298b0;
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .tile, .step, .cap-card { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .tile-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 860px) {
  .nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); padding: 26px 0; gap: 22px; }
  .section { padding: 64px 0; }
  .hero-content { padding: 80px 0; }
  .hero { min-height: 64vh; }
  .tile-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; padding: 46px 0 36px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .lightbox img { max-height: 66vh; }
}

@media (max-width: 420px) {
  body { font-size: 16px; }
  .btn { padding: 12px 20px; font-size: 0.94rem; }
  .hero-actions .btn { width: 100%; }
}
