/* Songyi Rubber & Sealing — stylesheet
   Palette taken from the brand mark: graphite #1B1B1F, deep blue #0F4C81. */

:root {
  --ink: #1B1B1F;
  --ink-soft: #4B4F57;
  --blue: #0F4C81;
  --blue-dark: #0B3A63;
  --paper: #FFFFFF;
  --paper-alt: #F6F7F9;
  --line: #E1E4E8;
  --wrap: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--blue); }

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

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 78px;
}

.brand { margin-right: auto; }
.brand img { width: 208px; height: auto; }

.nav {
  display: flex;
  gap: 26px;
  font-size: 15.5px;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.nav a:hover { color: var(--blue); border-bottom-color: var(--blue); }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 620;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.btn-sm { padding: 10px 18px; font-size: 14.5px; }

.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }

.btn-ghost { border-color: #C4CAD1; color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }

/* ---------- hero ---------- */

.hero {
  padding: 76px 0 70px;
  background:
    radial-gradient(900px 420px at 92% -12%, rgba(15, 76, 129, 0.07), transparent 68%),
    var(--paper);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 680;
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(34px, 4.4vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.022em;
  font-weight: 750;
}

.lede {
  margin: 0 0 30px;
  max-width: 46ch;
  font-size: clamp(17px, 1.6vw, 19.5px);
  color: var(--ink-soft);
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-note {
  margin: 24px 0 0;
  font-size: 15px;
  color: var(--ink-soft);
  max-width: 46ch;
}

.hero-art {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 12px 12px 0;
  box-shadow: 0 1px 2px rgba(27, 27, 31, 0.04), 0 12px 32px rgba(27, 27, 31, 0.05);
}

.hero-art svg { width: 100%; height: auto; display: block; }

.hero-art figcaption {
  font-size: 13px;
  color: var(--ink-soft);
  padding: 12px 4px 14px;
  border-top: 1px solid var(--line);
  margin-top: 6px;
}

/* ---------- capability strip ---------- */

.strip {
  background: var(--ink);
  color: #fff;
  padding: 36px 0;
}

.strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.strip-grid div { display: flex; flex-direction: column; gap: 5px; }

.strip strong {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.strip span { font-size: 14px; color: #C2C7CE; line-height: 1.45; }

/* ---------- sections ---------- */

.section { padding: 88px 0; }
.section-alt { background: var(--paper-alt); }

.section h2 {
  margin: 0 0 14px;
  font-size: clamp(26px, 3.2vw, 36px);
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.section-lede {
  margin: 0 0 44px;
  max-width: 68ch;
  font-size: 17.5px;
  color: var(--ink-soft);
}

/* ---------- product cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px 26px;
  background: var(--paper);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.card:hover {
  border-color: #C4CAD1;
  box-shadow: 0 6px 20px rgba(27, 27, 31, 0.05);
}

.card-img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #FAFBFC;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 0 0 18px;
}

.card h3 {
  margin: 0 0 9px;
  font-size: 18.5px;
  font-weight: 680;
  letter-spacing: -0.005em;
}

.card p { margin: 0; font-size: 16px; color: var(--ink-soft); }

/* ---------- process ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 34px;
}

.steps li {
  border-top: 2px solid var(--blue);
  padding-top: 22px;
}

.step-no {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}

.steps h3 {
  margin: 0 0 9px;
  font-size: 17.5px;
  font-weight: 680;
  line-height: 1.35;
}

.steps p { margin: 0; font-size: 15.5px; color: var(--ink-soft); }

/* ---------- materials table ---------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

table { width: 100%; border-collapse: collapse; font-size: 16px; }

th, td {
  text-align: left;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: #EEF1F4;
  font-size: 12.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 700;
}

th.col-mat { width: 190px; }

tbody tr:last-child td { border-bottom: 0; }

/* ---------- points ---------- */

.points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 46px;
}

.points li {
  padding-left: 24px;
  position: relative;
  color: var(--ink-soft);
  font-size: 16.5px;
}

.points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
}

.points strong { color: var(--ink); }

/* ---------- contact ---------- */

.contact { border-top: 1px solid var(--line); }

.mail { font-size: clamp(21px, 2.8vw, 30px); font-weight: 700; margin: 20px 0 14px; }
.mail a { text-decoration: none; border-bottom: 2px solid rgba(15, 76, 129, 0.25); }
.mail a:hover { border-bottom-color: var(--blue); }

.small { font-size: 15.5px; color: var(--ink-soft); max-width: 66ch; }

/* ---------- footer ---------- */

.site-footer {
  background: var(--ink);
  color: #C9CDD3;
  padding: 44px 0;
  font-size: 15px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer strong { color: #fff; font-weight: 650; }
.site-footer a { color: #C9CDD3; }
.site-footer a:hover { color: #fff; }
.site-footer p { margin: 0; }

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-art { max-width: 520px; }
  .header-cta { display: none; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 30px; }
  .points { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .strip-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .hero { padding: 56px 0 52px; }
  .section { padding: 64px 0; }
  .nav { display: none; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .brand img { width: 176px; }
  .cards { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .strip strong { font-size: 19px; }
  .hero h1 { font-size: 32px; }
  .points li { font-size: 16px; }
  th, td { padding: 14px 16px; }

  /* 手机上按钮直接竖排，不依赖 flex 自动换行 */
  .actions { flex-direction: column; align-items: stretch; }
  .actions .btn { text-align: center; white-space: normal; }

  /* 材料表在手机上按材料堆叠成卡片，比挤三列好读 */
  .table-wrap { border: 0; background: transparent; }
  table, thead, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tbody tr {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    margin-bottom: 12px;
    padding: 4px 0 10px;
  }
  td { border: 0; padding: 7px 18px; }
  td:first-child { padding-top: 14px; font-size: 18px; }
  td::before {
    content: attr(data-label);
    display: block;
    font-size: 11.5px;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--ink-soft);
    font-weight: 700;
    margin-bottom: 2px;
  }
  td:first-child::before { display: none; }
}

/* 产品图区（site/build_gallery.py 生成 figure，0 张图时整块不出现） */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  margin-top: 26px;
}
.gallery figure { margin: 0; }
.gallery img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}
.gallery figcaption {
  margin-top: 7px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-soft);
}
@media (max-width: 640px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .gallery figcaption { font-size: 12px; }
}

/* ---------- 产品分页 ---------- */

.crumb {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 18px;
}
.crumb a { color: var(--ink-soft); text-decoration: none; }
.crumb a:hover { color: var(--blue); }

.page-h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 750;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.pg-item {
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pg-item img { width: 100%; height: 100%; object-fit: contain; }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.cat-link {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px 22px;
  text-decoration: none;
  color: var(--ink);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.cat-link:hover { border-color: #C4CAD1; box-shadow: 0 6px 20px rgba(27,27,31,.05); }
.cat-link img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #FAFBFC;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 0 0 16px;
}
.cat-link strong { display: block; font-size: 18px; font-weight: 680; margin-bottom: 4px; }
.cat-link span { font-size: 14px; color: var(--ink-soft); }

.page-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  align-items: center;
}
.page-intro-copy { min-width: 0; }
.page-hero { margin: 0; }
.page-hero img {
  display: block;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #FAFBFC;
  border: 1px solid var(--line);
  border-radius: 8px;
}
@media (max-width: 760px) {
  .page-intro { grid-template-columns: 1fr; gap: 22px; }
  .page-hero img { max-width: 240px; }
}

.section-more { margin: 26px 0 0; font-size: 16px; }
.section-more a { font-weight: 620; text-decoration: none; }
.section-more a:hover { text-decoration: underline; }

.card .more { margin: 14px 0 0; font-size: 15px; }
.card .more a { text-decoration: none; font-weight: 620; }
.card .more a:hover { text-decoration: underline; }

@media (max-width: 1000px) {
  .photo-grid { grid-template-columns: repeat(4, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: 1fr; }
}


/* 参数表可能上百行：固定高度内滚动，避免页面被拉长 */
.table-scroll { max-height: 620px; overflow-y: auto; }
.table-scroll thead th { position: sticky; top: 0; z-index: 2; }
.table-hint { margin: 10px 0 0; }
