/* 上海荣相环境工程有限公司 — 站点样式 */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
:root {
  --c-primary: #1565d8;
  --c-primary-dark: #0a4cb0;
  --c-accent: #f08a24;
  --c-green: #6ab84a;
  --c-bg: #f5f9ff;
  --c-text: #1f2a3d;
  --c-muted: #5a6a82;
  --c-border: #e3edf9;
  --c-card: #ffffff;
  --c-soft: #eaf3ff;
  --shadow-sm: 0 2px 6px rgba(21, 101, 216, 0.06);
  --shadow-md: 0 8px 24px rgba(21, 101, 216, 0.10);
  --shadow-lg: 0 20px 40px rgba(21, 101, 216, 0.12);
  --radius: 14px;
  --radius-sm: 8px;
  --maxw: 1200px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--c-primary); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--c-primary-dark); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { color: var(--c-text); font-weight: 700; line-height: 1.3; }
h1 { font-size: clamp(28px, 4vw, 44px); }
h2 { font-size: clamp(22px, 2.6vw, 32px); }
h3 { font-size: 20px; }
p { color: var(--c-text); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.section-alt { background: linear-gradient(180deg, #ffffff 0%, var(--c-soft) 100%); }
.text-muted { color: var(--c-muted); }
.text-center { text-align: center; }

/* ============ Header ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--c-border);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-weight: 800; color: var(--c-text); letter-spacing: 0.5px;
}
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
  color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 16px; letter-spacing: 1px;
  box-shadow: var(--shadow-sm);
}
.brand-mark .accent { color: var(--c-accent); }
.brand-text-zh { font-size: 15px; }
.brand-text-en { font-size: 11px; color: var(--c-muted); font-weight: 600; letter-spacing: 2px; }
.nav-toggle {
  display: none; background: none; border: 0; padding: 8px; cursor: pointer;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--c-text); margin: 5px 0; transition: .2s; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  display: inline-block; padding: 10px 14px; border-radius: 8px;
  color: var(--c-text); font-size: 14.5px; font-weight: 500;
}
.nav-links a:hover { background: var(--c-soft); color: var(--c-primary); }
.nav-links a.active { color: var(--c-primary); background: var(--c-soft); font-weight: 600; }

/* dropdown */
.has-dropdown { position: relative; }
.dropdown {
  position: absolute; top: calc(100% + 6px); left: 0;
  background: #fff; border: 1px solid var(--c-border);
  border-radius: 12px; min-width: 240px; padding: 8px;
  box-shadow: var(--shadow-md);
  opacity: 0; transform: translateY(6px); pointer-events: none;
  transition: .15s ease;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown { opacity: 1; transform: none; pointer-events: auto; }
.dropdown a {
  display: block; padding: 9px 12px; border-radius: 6px; font-size: 14px;
  color: var(--c-text);
}
.dropdown a:hover { background: var(--c-soft); color: var(--c-primary); }
.caret { font-size: 10px; margin-left: 4px; opacity: 0.6; }

/* ============ Hero ============ */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse at top right, #cfe2ff 0%, transparent 55%),
    linear-gradient(135deg, #f1f7ff 0%, #e7f1fe 45%, #d9eafd 100%);
  padding: 96px 0 88px;
}
.hero::before {
  content: ""; position: absolute; inset: auto -10% -40% -10%; height: 70%;
  background: radial-gradient(ellipse at center, rgba(21,101,216,0.10), transparent 65%);
  pointer-events: none;
}
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center;
}
.hero-eyebrow {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: rgba(21,101,216,0.10); color: var(--c-primary);
  font-size: 13px; font-weight: 600; letter-spacing: 1px;
  margin-bottom: 20px;
}
.hero h1 { margin: 0 0 18px; }
.hero h1 .highlight {
  background: linear-gradient(120deg, var(--c-primary), #4ea0ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { font-size: 17px; color: var(--c-muted); max-width: 560px; margin: 0 0 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; font-weight: 600; font-size: 14.5px;
  border: 1px solid transparent; cursor: pointer; transition: .15s ease;
}
.btn-primary { background: var(--c-primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--c-primary-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost { background: #fff; color: var(--c-primary); border-color: var(--c-border); }
.btn-ghost:hover { background: var(--c-soft); color: var(--c-primary); }

.hero-visual {
  position: relative; aspect-ratio: 4/3; border-radius: 20px; overflow: hidden;
  background: linear-gradient(135deg, #fff, #eaf3ff);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--c-border);
}
.hero-visual::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(255,255,255,0.6));
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }

.hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 56px;
}
.stat-card {
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 22px 20px; box-shadow: var(--shadow-sm);
}
.stat-num { font-size: 30px; font-weight: 800; color: var(--c-primary); }
.stat-label { color: var(--c-muted); font-size: 14px; margin-top: 4px; }

/* ============ Page banner (sub-pages) ============ */
.page-banner {
  background:
    linear-gradient(135deg, rgba(21,101,216,0.92), rgba(10,76,176,0.92)),
    radial-gradient(ellipse at top right, #4ea0ff 0%, transparent 60%);
  color: #fff; padding: 64px 0 56px;
}
.page-banner h1 { color: #fff; margin: 0 0 8px; }
.page-banner .crumbs { color: rgba(255,255,255,0.8); font-size: 14px; }
.page-banner .crumbs a { color: rgba(255,255,255,0.95); }
.page-banner .crumbs a:hover { color: #fff; }
.page-banner .subtitle { color: rgba(255,255,255,0.85); margin-top: 14px; max-width: 720px; }

/* ============ Cards & grids ============ */
.section-title { text-align: center; margin-bottom: 14px; }
.section-sub { text-align: center; color: var(--c-muted); max-width: 720px; margin: 0 auto 48px; }

.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); }

.card {
  background: var(--c-card); border: 1px solid var(--c-border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #c8defb; }
.card h3 { margin: 0 0 8px; }
.card p { color: var(--c-muted); margin: 0; font-size: 14.5px; }

.product-card {
  position: relative; overflow: hidden; padding: 0;
}
.product-card .thumb {
  aspect-ratio: 16/10; background: linear-gradient(135deg, #eaf3ff, #f7fbff);
  display: grid; place-items: center; overflow: hidden;
  border-bottom: 1px solid var(--c-border);
}
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card:hover .thumb img { transform: scale(1.04); }
.product-card .body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.product-card .tag {
  display: inline-block; font-size: 12px; font-weight: 600;
  color: var(--c-primary); background: var(--c-soft);
  padding: 4px 10px; border-radius: 999px; margin-bottom: 10px;
  align-self: flex-start;
}
.product-card .more { margin-top: auto; padding-top: 16px; font-weight: 600; font-size: 14px; }
.product-card .more::after { content: " →"; transition: margin .15s; display: inline-block; }
.product-card:hover .more::after { margin-left: 4px; }

/* feature list */
.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li {
  position: relative; padding: 6px 0 6px 28px; color: var(--c-text);
}
.feature-list li::before {
  content: "✓"; position: absolute; left: 0; top: 6px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--c-soft); color: var(--c-primary);
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}

/* split content */
.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
.split.reverse > :first-child { order: 2; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow-md); border: 1px solid var(--c-border); }

/* table */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--c-border); border-radius: var(--radius); background: #fff; }
table.data {
  width: 100%; border-collapse: collapse; font-size: 14px;
}
table.data th, table.data td {
  padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--c-border);
}
table.data th { background: var(--c-soft); color: var(--c-primary-dark); font-weight: 700; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: #f7fbff; }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.gallery img { border-radius: var(--radius-sm); border: 1px solid var(--c-border); box-shadow: var(--shadow-sm); aspect-ratio: 4/3; object-fit: cover; }

/* CTA */
.cta {
  background: linear-gradient(135deg, var(--c-primary), var(--c-primary-dark));
  border-radius: 20px; padding: 44px; color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  box-shadow: var(--shadow-lg);
}
.cta h2 { color: #fff; margin: 0 0 6px; }
.cta p { color: rgba(255,255,255,0.85); margin: 0; }
.cta .btn-ghost { background: #fff; color: var(--c-primary); border-color: #fff; }

/* Footer */
.site-footer {
  background: #0f1d33; color: #c7d4ea; padding: 56px 0 24px; margin-top: 60px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px;
}
.site-footer h4 { color: #fff; font-size: 15px; margin: 0 0 16px; }
.site-footer a { color: #c7d4ea; font-size: 14px; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; font-size: 14px; }
.site-footer .copyright { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 36px; padding-top: 20px; font-size: 13px; color: #8aa0c1; text-align: center; }
.contact-line { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; font-size: 14px; }
.contact-line .ico { flex: 0 0 18px; opacity: 0.7; }

/* small icons (svg) */
.ico {
  display: inline-block; width: 18px; height: 18px; vertical-align: middle;
}

/* mechanism block (chemistry equations) */
.eq-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
}
.eq {
  background: #fff; border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-primary);
  border-radius: 10px; padding: 14px 18px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
}
.eq .target {
  display: inline-block; font-family: -apple-system, sans-serif;
  background: var(--c-soft); color: var(--c-primary-dark);
  font-weight: 700; font-size: 12px; padding: 2px 8px; border-radius: 4px;
  margin-right: 10px; letter-spacing: 0.5px;
}

/* contact form */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--c-muted); margin-bottom: 6px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 14px; font-size: 14.5px;
  border: 1px solid var(--c-border); border-radius: 10px;
  font-family: inherit; color: var(--c-text); background: #fff;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(21,101,216,0.12);
}

/* misc */
.divider { height: 1px; background: var(--c-border); margin: 24px 0; }
.badge-list { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  font-size: 12.5px; padding: 5px 12px; border-radius: 999px;
  background: var(--c-soft); color: var(--c-primary-dark); font-weight: 600;
}

/* responsive */
@media (max-width: 960px) {
  .hero-grid, .split, .grid-2, .grid-3, .grid-4, .footer-grid, .contact-grid, .eq-grid, .hero-stats { grid-template-columns: 1fr; }
  .split.reverse > :first-child { order: 0; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--c-border);
    flex-direction: column; align-items: stretch; padding: 12px;
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .2s;
    box-shadow: var(--shadow-md);
    max-height: calc(100vh - 68px); overflow-y: auto;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-toggle { display: block; }
  .dropdown {
    position: static; box-shadow: none; border: 0; padding: 4px 0 4px 12px;
    opacity: 1; pointer-events: auto; transform: none; min-width: 0;
    background: transparent;
  }
  .has-dropdown:hover .dropdown { background: transparent; }
  .cta { flex-direction: column; text-align: center; padding: 32px 24px; }
  .section { padding: 56px 0; }
  .hero { padding: 64px 0 56px; }
  .form-row { grid-template-columns: 1fr; }
}
