/*
Theme Name: SitePilot Demo
Theme URI: https://example.com/
Author: SitePilot
Description: 工业品牌风格的企业站主题，用于 CMS 接入与内容维护测试。
Version: 1.0
Text Domain: sitepilot-demo
*/

:root {
  --ink: #0e1116;
  --paper: #ffffff;
  --muted: #6b7280;
  --line: #e6e8ec;
  --accent: #e04e2a;
  --accent-dark: #b83c1f;
  --dark: #14181d;
  --soft: #f5f6f8;
  --max: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 16px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.02em; }
p { margin: 0; }

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

/* header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 40px; height: 72px; }
.brand { display: flex; align-items: baseline; gap: 10px; font-weight: 800; letter-spacing: .02em; }
.brand span.en { font-size: 11px; letter-spacing: .22em; color: var(--muted); font-weight: 600; }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav li { list-style: none; }
.nav .current-menu-item > a, .nav .current_page_item > a { border-color: var(--accent); }
.nav a { font-size: 14px; color: #2a2f36; padding: 6px 0; border-bottom: 2px solid transparent; display: inline-block; }
.nav a:hover { border-color: var(--accent); }
.header-cta {
  background: var(--accent); color: #fff; padding: 10px 18px;
  border-radius: 4px; font-size: 13.5px; font-weight: 600;
}
.header-cta:hover { background: var(--accent-dark); }

/* hero */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background:
    linear-gradient(90deg, rgba(8,10,14,.94) 0%, rgba(8,10,14,.78) 42%, rgba(8,10,14,.38) 100%),
    url("assets/hero.jpg") center / cover no-repeat;
}
.hero:before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.7), transparent 85%);
}
.hero .wrap { position: relative; padding: 110px 24px 84px; }
.eyebrow { font-size: 11.5px; letter-spacing: .22em; color: #c9a18f; font-weight: 700; }
.hero h1 { font-size: 54px; margin: 18px 0 22px; max-width: 780px; }
.hero p.lead { font-size: 17px; color: #c9ced6; max-width: 640px; line-height: 1.9; }
.hero-actions { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 13px 24px; border-radius: 4px;
  font-size: 14px; font-weight: 600; border: 1px solid transparent;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.ghost { border-color: rgba(255,255,255,.35); color: #fff; }
.btn.ghost:hover { border-color: #fff; }

.stats { border-top: 1px solid rgba(255,255,255,.14); margin-top: 64px; display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 24px 0 4px; }
.stat b { display: block; font-size: 30px; letter-spacing: -0.02em; }
.stat span { font-size: 12.5px; color: #9aa3ae; }

/* sections */
.section { padding: 88px 0; }
.section.soft { background: var(--soft); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 34px; }
.section-head h2 { font-size: 34px; }
.section-head p { color: var(--muted); font-size: 14px; margin-top: 8px; }
.link-more { font-size: 13.5px; color: var(--accent); font-weight: 600; white-space: nowrap; }

/* series */
.series { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.series-card {
  position: relative; min-height: 300px; border-radius: 8px; overflow: hidden;
  display: flex; align-items: flex-end; padding: 26px; color: #fff;
  background: linear-gradient(160deg, #232a33, #0d1116);
}
.series-card:nth-child(2) { background: linear-gradient(160deg, #3a2a22, #17110d); }
.series-card:nth-child(3) { background: linear-gradient(160deg, #1f2c2a, #0d1413); }
.series-card.s1 { background: linear-gradient(180deg, rgba(10,12,16,.18), rgba(10,12,16,.88)), url("assets/p1.jpg") center / cover no-repeat; }
.series-card.s2 { background: linear-gradient(180deg, rgba(10,12,16,.18), rgba(10,12,16,.88)), url("assets/p2.jpg") center / cover no-repeat; }
.series-card.s3 { background: linear-gradient(180deg, rgba(10,12,16,.18), rgba(10,12,16,.88)), url("assets/p3.jpg") center / cover no-repeat; }
.series-card:after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(180deg, transparent, rgba(0,0,0,.6));
}
.series-card .inner { position: relative; z-index: 1; }
.series-card h3 { font-size: 24px; }
.series-card p { font-size: 12.5px; color: #c9ced6; margin-top: 4px; letter-spacing: .12em; }

/* products */
.grid-products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.product-card { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; transition: .2s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(16,24,32,.08); }
.thumb {
  aspect-ratio: 4 / 3; position: relative; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, #1b222a, #0e1318);
}
.thumb.alt { background: linear-gradient(150deg, #35261f, #14100d); }
.thumb.alt2 { background: linear-gradient(150deg, #1e2b28, #0d1412); }
.thumb code { color: rgba(255,255,255,.22); font-size: 42px; letter-spacing: .08em; font-weight: 700; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb .badge {
  position: absolute; left: 14px; top: 14px; font-size: 11px; color: #fff;
  background: rgba(224,78,42,.9); padding: 3px 8px; border-radius: 3px;
}
.product-body { padding: 20px 20px 22px; }
.product-body h3 { font-size: 18px; }
.price { color: var(--accent); font-weight: 700; font-size: 15px; margin-top: 8px; }
.desc { color: var(--muted); font-size: 13.5px; margin-top: 8px; min-height: 44px; }
.product-links { display: flex; gap: 16px; margin-top: 14px; font-size: 12.5px; color: #2a2f36; }
.product-links a:hover { color: var(--accent); }

/* news */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.news-item { border-top: 2px solid var(--ink); padding-top: 18px; }
.news-meta { font-size: 12px; color: var(--muted); display: flex; gap: 10px; }
.news-item h3 { font-size: 16.5px; margin-top: 10px; line-height: 1.55; }
.news-item a:hover h3 { color: var(--accent); }

/* cta */
.band { background: var(--accent); color: #fff; }
.band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 46px 24px; flex-wrap: wrap; }
.band h2 { font-size: 26px; }
.band .btn { background: #fff; color: var(--accent); }

/* footer */
.site-footer { background: var(--dark); color: #c3c9d2; padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.site-footer h4 { color: #fff; font-size: 13px; letter-spacing: .08em; margin-bottom: 14px; }
.site-footer a { color: #c3c9d2; font-size: 13.5px; display: block; padding: 5px 0; }
.site-footer a:hover { color: #fff; }
.site-footer .brand { color: #fff; }
.copyright { border-top: 1px solid rgba(255,255,255,.12); margin-top: 44px; padding-top: 20px; font-size: 12px; color: #8b94a0; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* inner pages */
.page-hero { background: var(--dark); color: #fff; padding: 64px 0; }
.page-hero h1 { font-size: 38px; }
.page-hero p { color: #aab2bd; margin-top: 10px; font-size: 14px; }
.page-body { padding: 64px 0 88px; }
.page-body .content { max-width: 820px; }
.page-body h2 { font-size: 26px; margin: 36px 0 14px; }
.page-body h3 { font-size: 20px; margin: 26px 0 10px; }
.page-body p { margin: 0 0 16px; color: #2f343b; }
.page-body ul { padding-left: 22px; color: #2f343b; }

/* product detail */
.product-hero { padding: 56px 0 20px; background: #fff; }
.product-detail { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.pd-media img { width: 100%; border-radius: 8px; display: block; }
.pd-media .thumb { border-radius: 8px; min-height: 360px; }
.pd-info h1 { font-size: 38px; margin-top: 10px; }

/* responsive */
@media (max-width: 980px) {
  .nav { display: none; }
  .hero h1 { font-size: 40px; }
  .series, .grid-products, .news-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 18px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .product-detail { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 640px) {
  .hero h1 { font-size: 32px; }
  .hero .wrap { padding: 72px 20px 60px; }
  .section { padding: 64px 0; }
  .series, .grid-products, .news-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
}

/* news cards with image */
.news-item { border-top: none; }
.news-thumb { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; margin-bottom: 14px; background: #e9ecf0; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.chip { display: inline-block; background: #e04e2a; color: #fff; font-size: 11.5px; padding: 2px 8px; border-radius: 3px; }
.post-row { display: grid; grid-template-columns: 300px 1fr; gap: 28px; padding: 26px 0; border-bottom: 1px solid #e6e8ec; align-items: center; }
.post-thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 6px; background: #e9ecf0; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-main h3 { font-size: 21px; margin-top: 10px; }
.post-main .excerpt { color: #6b7280; margin-top: 8px; font-size: 14px; }
@media (max-width: 760px) { .post-row { grid-template-columns: 1fr; gap: 14px; } }

/* page components */
.page-body .content { max-width: 1000px; }
.sp-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 24px 0; }
.sp-card { border: 1px solid #e6e8ec; border-radius: 8px; padding: 20px; background: #fff; }
.sp-card h3 { font-size: 17px; margin-bottom: 8px; }
.sp-card p { color: #6b7280; font-size: 13.5px; margin: 0; }
.sp-form { background: #f5f6f8; padding: 24px; border-radius: 8px; margin: 24px 0; }
.sp-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 14px; }
.sp-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.sp-form input, .sp-form select, .sp-form textarea { width: 100%; padding: 11px 12px; border: 1px solid #d5d9df; border-radius: 4px; font: inherit; font-size: 14px; background: #fff; }
.sp-form textarea { min-height: 110px; resize: vertical; }
.sp-form button { background: #e04e2a; color: #fff; border: 0; padding: 13px 26px; border-radius: 4px; font-weight: 600; font-size: 14px; cursor: pointer; }
.sp-form button:hover { background: #b83c1f; }
.sp-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 24px 0; }
.sp-steps div { border-top: 2px solid #e04e2a; padding-top: 14px; }
.sp-steps b { display: block; font-size: 12px; color: #e04e2a; letter-spacing: .12em; }
.sp-steps h4 { margin: 6px 0; font-size: 16px; }
.sp-steps p { color: #6b7280; font-size: 13px; margin: 0; }
.sp-table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 13.5px; }
.sp-table th, .sp-table td { border: 1px solid #e6e8ec; padding: 10px 12px; text-align: left; }
.sp-table th { background: #f5f6f8; }
.sp-timeline { border-left: 2px solid #e04e2a; margin: 24px 0; padding: 0 0 0 24px; }
.sp-timeline li { list-style: none; margin-bottom: 18px; }
.sp-timeline b { color: #e04e2a; margin-right: 10px; }
.sp-faq details { border-bottom: 1px solid #e6e8ec; padding: 14px 0; }
.sp-faq summary { font-weight: 600; cursor: pointer; }
.sp-faq p { color: #6b7280; margin-top: 8px; }
@media (max-width: 860px) { .sp-cards, .sp-steps { grid-template-columns: 1fr 1fr; } .sp-form .row { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .sp-cards, .sp-steps { grid-template-columns: 1fr; } }
