/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* 黑红配色 — 上下栏暗色，内容区亮色 */
  --primary: #c0392b;
  --primary-light: #e74c3c;
  --primary-bg: #fdf0f0;
  --page-bg: #1a1a1a;
  --text: #333333;
  --text-light: #666666;
  --text-lighter: #999999;
  --bg: #ffffff;
  --bg-alt: #f5f6f8;
  --border: #e0e0e0;
  --radius: 4px;
  --shadow: 0 2px 8px rgba(0,0,0,.06);
  --shadow-hover: 0 4px 20px rgba(0,0,0,.1);
  --page-width: 1430px;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Microsoft YaHei", "微软雅黑", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  line-height: 1.8;
  background: var(--page-bg);
  font-size: 14px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

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

/* ===== Header ===== */
header {
  background: #141414;
  border-bottom: 1px solid #333;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
  transition: all .3s ease;
}
/* 滚动到白底区域时切换 */
header.light {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
header.light .nav > li > a { color: #333; }
header.light .nav > li > a:hover,
header.light .nav > li.active > a { color: var(--primary); }
header.light .lang-switch,
header.light .lang-switch a { color: #666; }
header.light .lang-switch a:hover,
header.light .lang-switch a.active { color: var(--primary); background: var(--primary-bg); }
header.light .nav .dropdown { background: #fff; border-color: #e0e0e0; }
header.light .nav .dropdown li a { color: #333; border-color: #e0e0e0; }
header.light .nav .dropdown li a:hover { background: var(--primary-bg); }
header.light .logo img { filter: none; }

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 79px; padding-left: 0; padding-right: 20px;
}

/* Logo — 左上顶齐 */
.logo { display: flex; align-items: flex-start; flex-shrink: 0; align-self: flex-start; }
.logo img { height: 65px; width: auto; margin-top: 4px; filter: brightness(0) invert(1); }
.logo:hover { opacity: .85; }

/* ===== Nav ===== */
.nav { display: flex; gap: 0; margin: 0 auto 0 24px; }
.nav > li { position: relative; }
.nav > li > a {
  display: block; padding: 26px 20px;
  font-size: 16px; color: var(--text); font-weight: 500;
  transition: color .2s; white-space: nowrap;
}
.nav > li > a { color: #ccc; }
.nav > li > a:hover,
.nav > li.active > a { color: var(--primary-light); }

/* ===== Dropdown ===== */
.nav .dropdown {
  position: absolute; top: 100%; left: 0;
  background: #1a1a1a; min-width: 180px;
  box-shadow: var(--shadow-hover); border-radius: 0 0 var(--radius) var(--radius);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all .25s ease;
  z-index: 200; overflow: hidden;
  border: 1px solid #333; border-top: none;
}
.nav > li:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }

.nav .dropdown li a {
  display: block; padding: 12px 20px;
  font-size: 15px; color: #ccc;
  border-bottom: 1px solid #333;
  transition: all .2s;
}
.nav .dropdown li:last-child a { border-bottom: none; }
.nav .dropdown li a:hover { background: #2a1515; color: var(--primary-light); }

/* ===== Language Switcher ===== */
.lang-switch { display: flex; align-items: center; gap: 4px; font-size: 13px; color: #888; flex-shrink: 0; }
.lang-switch a { color: #888; padding: 4px 8px; border-radius: 3px; transition: all .2s; }
.lang-switch a:hover,
.lang-switch a.active { color: var(--primary-light); background: #2a1515; }
.lang-switch .sep { color: var(--border); }

/* ===== Banner Carousel (全屏) ===== */
.banner { position: relative; width: 100%; height: 100vh; min-height: 500px; max-height: 900px; overflow: hidden; }
.banner-sm { position: relative; width: 100%; height: 600px; overflow: hidden; }
.banner-sm .banner-slide::after { display: none; }
/* 产品海报 — 不加蒙版 */
.banner-clean .banner-slide::after { display: none; }
.banner-slides { display: flex; height: 100%; transition: transform .6s ease-in-out; }
.banner-slide {
  min-width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; text-align: center;
  position: relative;
}
/* 暗色蒙版 — 保证文字可读 */
.banner-slide::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 1;
}
/* 黑红调 Banner（无图片时的备用） */
.banner-slide:nth-child(1) { background: linear-gradient(135deg, #1a0808 0%, #2d1010 50%, #3d1515 100%); }
.banner-slide:nth-child(2) { background: linear-gradient(135deg, #0d0606 0%, #1a0c0c 50%, #2d1111 100%); }
.banner-slide:nth-child(3) { background: linear-gradient(135deg, #140808 0%, #200d0d 50%, #301313 100%); }

.banner-content { position: relative; z-index: 2; }
.banner-content h2 { font-size: 44px; font-weight: 700; margin-bottom: 18px; text-shadow: 0 2px 16px rgba(0,0,0,.4); }
.banner-content p { font-size: 18px; opacity: .9; max-width: 700px; margin: 0 auto 32px; line-height: 1.6; text-shadow: 0 1px 8px rgba(0,0,0,.3); }
.banner-content .btn { font-size: 16px; padding: 12px 40px; }

/* Dots */
.banner-dots { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; }
.banner-dots span {
  width: 12px; height: 12px; border-radius: 50%;
  background: rgba(255,255,255,.4); cursor: pointer; transition: all .3s;
}
.banner-dots span.active { background: #fff; width: 32px; border-radius: 6px; }

/* Arrows */
.banner-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,.15); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; cursor: pointer; transition: background .3s; border: none;
}
.banner-arrow:hover { background: rgba(255,255,255,.3); }
.banner-arrow.prev { left: 40px; }
.banner-arrow.next { right: 40px; }

/* ===== Section ===== */
.section { padding: 60px 0; }
.section-white { background: var(--bg); }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 28px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.section-header h2::after {
  content: ''; display: block; width: 50px; height: 3px;
  background: var(--primary); margin: 12px auto 0;
}
.section-header p { color: var(--text-light); font-size: 15px; }

/* ===== Home: Product Section (MicroPhase Style) ===== */
.product-block { margin-bottom: 60px; }
.product-block:last-child { margin-bottom: 0; }

.product-block-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 28px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.product-block-header h2 {
  font-size: 20px; font-weight: 700; color: var(--text);
}
.product-block-header h2 small {
  font-size: 14px; font-weight: 400; color: var(--text-lighter);
  margin-left: 10px;
}
.product-block-header .view-all {
  font-size: 13px; color: var(--primary); white-space: nowrap;
  transition: color .2s;
}
.product-block-header .view-all:hover { color: var(--primary-light); }

.product-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: all .3s; text-align: center;
}
.product-card:hover {
  box-shadow: var(--shadow-hover); transform: translateY(-4px);
  border-color: #aaa;
}
.product-card-img {
  height: 200px; background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.product-card-img img { width: 100%; height: 100%; object-fit: cover; }
.product-card-body { padding: 20px 16px; }
.product-card-body h4 { font-size: 15px; color: var(--text); margin-bottom: 6px; }
.product-card-body p { font-size: 13px; color: var(--text-lighter); }

/* ===== Home: Case Section ===== */
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.case-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; transition: all .3s;
}
.case-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.case-card .case-img {
  height: 220px; display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.case-card .case-img img { width: 100%; height: 100%; object-fit: cover; }
/* 黑红调案例卡片 */
.case-card:nth-child(1) .case-img { background: linear-gradient(135deg, #2d1515, #1a0808); }
.case-card:nth-child(2) .case-img { background: linear-gradient(135deg, #2d1010, #1a0a0a); }
.case-card:nth-child(3) .case-img { background: linear-gradient(135deg, #3d1515, #200d0d); }
.case-body { padding: 20px; }
.case-body h4 { font-size: 15px; margin-bottom: 6px; color: var(--text); }
.case-body p { color: var(--text-light); font-size: 13px; }

/* ===== Home: About Block ===== */
.about-block { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-block-img {
  height: 320px; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, #fdf0f0, #f5e0e0);
  display: flex; align-items: center; justify-content: center;
}
.about-block-img img { width: 100%; height: 100%; object-fit: cover; }
.about-block-text h3 { font-size: 24px; margin-bottom: 16px; color: var(--text); }
.about-block-text p { color: var(--text-light); margin-bottom: 12px; font-size: 14px; line-height: 1.9; }
.about-block-text .btn { margin-top: 12px; }

/* ===== Button ===== */
.btn {
  display: inline-block; padding: 10px 28px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; cursor: pointer; border: none;
  transition: all .2s; text-align: center; font-family: inherit;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); color: #fff; text-decoration: none; }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; text-decoration: none; }

/* ===== Page Banner (内页) ===== */
.page-banner {
  padding: 50px 0; text-align: center;
  background: linear-gradient(135deg, #fdf0f0 0%, #fce8e8 100%);
}
.page-banner h1 { font-size: 28px; font-weight: 700; color: var(--text); }
.page-banner p { color: var(--text-light); margin-top: 8px; font-size: 14px; }

/* ===== Products Page ===== */
.product-category { margin-bottom: 48px; }
.product-category h3 {
  font-size: 20px; padding-bottom: 10px; margin-bottom: 24px;
  border-bottom: 2px solid var(--primary); display: inline-block;
}
.product-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  text-align: center; padding: 24px 16px; transition: all .3s;
  background: var(--bg);
}
.product-item:hover { box-shadow: var(--shadow-hover); border-color: #aaa; }
.product-item .prod-img {
  width: 120px; height: 120px; margin: 0 auto 16px;
  background: var(--bg-alt); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
}
.product-item h4 { font-size: 14px; margin-bottom: 6px; }
.product-item p { color: var(--text-light); font-size: 13px; }

/* Tech tags (pill-style) */
.tech-tags { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.tech-tag {
  background: var(--primary-bg); padding: 5px 14px;
  border-radius: 20px; font-size: 13px; color: var(--text-light);
}

/* ===== Cases Page ===== */
.cases-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

/* ===== About Page ===== */
.about-content { max-width: 1000px; margin: 0 auto; }
.about-content h3 { font-size: 20px; margin: 36px 0 16px; color: var(--primary); }
.about-content p { color: var(--text-light); margin-bottom: 12px; text-indent: 2em; line-height: 1.9; }
.about-content .milestones { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 32px 0; }
.milestone { text-align: center; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.milestone .year { font-size: 28px; font-weight: 700; color: var(--primary); }
.milestone p { text-indent: 0; font-size: 13px; margin-top: 6px; }

/* ===== Join Page ===== */
.join-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.job-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; transition: all .3s; background: var(--bg);
}
.job-card:hover { box-shadow: var(--shadow-hover); }
.job-card h4 { font-size: 16px; margin-bottom: 8px; }
.job-card .meta { color: var(--text-light); font-size: 13px; margin-bottom: 10px; }
.job-card .meta span { margin-right: 20px; }
.job-card .desc { color: var(--text-light); font-size: 13px; }
.job-card .btn { margin-top: 14px; font-size: 13px; padding: 6px 20px; }

/* ===== Contact Page ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.contact-info h3 { font-size: 20px; margin-bottom: 20px; }
.contact-info .info-item {
  display: flex; align-items: flex-start; gap: 14px;
  margin-bottom: 18px;
}
.contact-info .info-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--primary-bg); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.info-item h5 { font-size: 14px; margin-bottom: 2px; }
.info-item p { color: var(--text-light); font-size: 13px; }

.contact-form {
  background: var(--bg-alt); padding: 36px;
  border-radius: var(--radius); border: 1px solid var(--border);
}
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; color: var(--text); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 14px; font-family: inherit;
  transition: border-color .2s; background: var(--bg);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: var(--primary);
}
.form-group textarea { resize: vertical; min-height: 120px; }

/* ===== Resources Page ===== */
.resources-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.resource-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; text-align: center; transition: all .3s; background: var(--bg);
}
.resource-card:hover { box-shadow: var(--shadow-hover); }
.resource-card .res-icon { font-size: 40px; margin-bottom: 14px; }
.resource-card h4 { font-size: 15px; margin-bottom: 6px; }
.resource-card p { color: var(--text-light); font-size: 13px; }

/* ===== Footer (MicroPhase 四列结构) ===== */
footer {
  background: #111111; color: #888888; font-size: 13px;
  padding: 0; margin-top: 0;
}

.footer-main {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px; padding: 48px 0;
}

footer h4 { color: #fff; font-size: 15px; margin-bottom: 18px; font-weight: 500; }
footer ul li { margin-bottom: 10px; }
footer ul a, footer ul li { color: #888; }
footer ul a:hover { color: var(--primary-light); }

.footer-about p { line-height: 1.8; margin-bottom: 12px; }

.footer-contact li { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 10px; }

.footer-qr { text-align: center; }
.footer-qr h4 { margin-bottom: 12px; }
.footer-qr img { display: block; margin: 0 auto 8px; width: 100px; border-radius: 4px; }
.footer-qr p { font-size: 12px; color: #666; }

.footer-bottom {
  border-top: 1px solid #2a2a2a; padding: 18px 0;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; flex-wrap: wrap; gap: 8px;
}
.footer-bottom a { color: #888; }
.footer-bottom a:hover { color: var(--primary-light); }

.footer-aliyun { font-size: 12px; color: #666; }
.footer-aliyun span { margin-right: 20px; }

/* ===== Product Sidebar Layout ===== */
.product-layout { display: flex; gap: 0; min-height: 600px; }
.product-sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--bg-alt); border-right: 1px solid var(--border);
  padding: 20px 0;
}
.product-sidebar h4 {
  font-size: 14px; color: var(--text-lighter); padding: 0 20px 12px;
  text-transform: uppercase; letter-spacing: 1px;
}
.product-sidebar ul { list-style: none; }
.product-sidebar li a {
  display: block; padding: 12px 20px; font-size: 14px;
  color: var(--text); border-left: 3px solid transparent;
  transition: all .2s;
}
.product-sidebar li a:hover,
.product-sidebar li a.active {
  color: var(--primary); background: #fff;
  border-left-color: var(--primary); font-weight: 600;
}
.product-main {
  flex: 1; padding: 30px 40px; background: var(--bg);
}
.product-main h2 { font-size: 22px; margin-bottom: 6px; }
.product-main .subtitle { color: var(--text-light); font-size: 14px; margin-bottom: 28px; }

/* ===== Poster Scroll ===== */
.poster-scroll {
  display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; padding-bottom: 8px;
}
.poster-scroll::-webkit-scrollbar { height: 6px; }
.poster-scroll::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
.poster-item {
  flex: 0 0 auto; width: 560px; scroll-snap-align: start;
  border-radius: 8px; overflow: hidden; box-shadow: var(--shadow);
  transition: transform .3s; cursor: pointer;
}
.poster-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.poster-item img { width: 100%; display: block; }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 32px; right: 32px;
  background: var(--primary); color: #fff; padding: 14px 24px;
  border-radius: 4px; font-size: 14px; z-index: 9999;
  transform: translateY(100px); opacity: 0; transition: all .3s;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ===== Responsive ===== */
@media (max-width: 1440px) {
  .container { padding: 0 30px; }
  .header-inner { padding-left: 0; padding-right: 20px; }
}
@media (max-width: 1240px) {
  .container { padding: 0 20px; }
  .header-inner { padding-left: 0; padding-right: 20px; }
  .product-cards { grid-template-columns: repeat(2, 1fr); }
  .product-list { grid-template-columns: repeat(3, 1fr); }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 30px; }
  .about-block { grid-template-columns: 1fr; gap: 30px; }
  .about-block-img { height: 240px; }
  .banner-content h2 { font-size: 32px; }
  .banner-content p { font-size: 16px; max-width: 500px; }
}
@media (max-width: 768px) {
  .header-inner { height: auto; flex-wrap: wrap; padding: 12px 0; }
  .nav { flex-wrap: wrap; margin: 8px 0 0; gap: 0; }
  .nav > li > a { padding: 10px 12px; font-size: 13px; }
  .banner { height: 60vh; min-height: 360px; }
  .banner-sm { height: 320px; }
  .banner-content h2 { font-size: 28px; }
  .banner-content p { font-size: 15px; max-width: 420px; }
  .banner-arrow { width: 36px; height: 36px; font-size: 16px; }
  .banner-arrow.prev { left: 16px; }
  .banner-arrow.next { right: 16px; }
  .product-cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .product-card-img { height: 150px; }
  .case-grid { grid-template-columns: 1fr; }
  .product-list { grid-template-columns: repeat(2, 1fr); }
  .cases-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .join-grid { grid-template-columns: 1fr; }
  .resources-grid { grid-template-columns: 1fr 1fr; }
  .milestones { grid-template-columns: repeat(2, 1fr) !important; }
  .about-block-text h3 { font-size: 20px; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 24px; }
  .section { padding: 40px 0; }
  .section-header h2 { font-size: 24px; }
}
@media (max-width: 480px) {
  .product-cards { grid-template-columns: 1fr; }
  .product-list { grid-template-columns: 1fr; }
  .cases-grid { grid-template-columns: 1fr; }
  .resources-grid { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr; }
  .banner { height: 50vh; min-height: 300px; }
  .banner-content h2 { font-size: 22px; }
}
