/* ============================================
   PhaseDriver — 上海相驱科技有限公司
   官网样式表
   ============================================ */

:root {
  --primary: #0d47a1;       /* 工业深蓝 */
  --primary-light: #1565c0;
  --primary-dark: #0a3476;
  --accent: #ff8f00;        /* 琥珀橙 - 点缀 */
  --text: #222;
  --text-light: #555;
  --text-muted: #888;
  --bg: #fff;
  --bg-soft: #f5f7fa;
  --bg-dark: #0e1a2b;
  --border: #e0e4ea;
  --maxw: 1200px;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
  --transition: 0.25s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

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

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  color: var(--primary-dark);
  letter-spacing: 0.5px;
}
.brand-mark {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 8px;
  display: grid; place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
}
.brand small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 2px;
}
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  position: relative;
}
.nav-links a:hover,
.nav-links a.active { color: var(--primary); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}
.nav-actions {
  display: flex; align-items: center; gap: 16px;
}
.lang-toggle {
  font-size: 13px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text);
}
.lang-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(13,71,161,0.92) 0%, rgba(21,101,192,0.88) 100%),
    url('../img/hero-bg.svg') center/cover;
  color: #fff;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -100px; right: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(255,143,0,0.25) 0%, transparent 70%);
  border-radius: 50%;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -150px; left: -50px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-inner { position: relative; z-index: 1; padding: 80px 0; text-align: center; max-width: 900px; margin: 0 auto; }
.hero h1 {
  font-size: clamp(26px, 3.5vw, 42px);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 20px;
  white-space: nowrap;
}
.hero p {
  font-size: 18px;
  line-height: 1.8;
  opacity: 0.92;
  margin-bottom: 32px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 15px;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: #ffa726;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,143,0,0.4);
}
.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.6);
}
.btn-outline:hover {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}

/* ---------- Sections ---------- */
section { padding: 80px 0; }
.section-head {
  text-align: center;
  margin-bottom: 56px;
}
.section-tag {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(13,71,161,0.08);
  color: var(--primary);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.section-head h2 {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 12px;
}
.section-head p {
  color: var(--text-light);
  max-width: 640px;
  margin: 0 auto;
  font-size: 16px;
}

/* ---------- Features ---------- */
.features { background: var(--bg-soft); }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.feature-card {
  background: #fff;
  padding: 32px 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all var(--transition);
  border-top: 3px solid var(--primary);
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.feature-icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 12px;
  display: grid; place-items: center;
  margin-bottom: 20px;
  font-size: 28px;
  color: #fff;
}
.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--primary-dark);
}
.feature-card p {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.7;
}

/* ---------- Products ---------- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}
.product-img {
  height: 200px;
  background: linear-gradient(135deg, #e8eaf6 0%, #c5cae9 100%);
  display: grid; place-items: center;
  border-radius: var(--radius) var(--radius) 0 0;
  position: relative;
  overflow: hidden;
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.4) 0%, transparent 60%);
}
.product-body { padding: 24px; }
.product-body h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 8px;
}
.product-body p {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
}
.product-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
  font-size: 12px;
  padding: 3px 10px;
  background: var(--bg-soft);
  color: var(--text-light);
  border-radius: 4px;
}
/* ---------- About / Company ---------- */
.about { background: var(--bg-soft); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-text h2 {
  font-size: 30px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 20px;
}
.about-text p {
  color: var(--text-light);
  margin-bottom: 16px;
  font-size: 15px;
  line-height: 1.9;
}
.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
}
.stat {
  text-align: center;
  padding: 20px 12px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.stat-num {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}
.stat-label {
  font-size: 13px;
  color: var(--text-muted);
}
.about-visual {
  position: relative;
  height: 400px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius);
  display: grid; place-items: center;
  color: #fff;
  overflow: hidden;
}
.about-visual::before {
  content: "";
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  background: rgba(255,143,0,0.3);
  border-radius: 50%;
}
.about-visual-inner {
  position: relative; z-index: 1;
  text-align: center;
  padding: 40px;
}
.about-visual h3 {
  font-size: 28px;
  margin-bottom: 12px;
}
.about-visual p { opacity: 0.9; font-size: 15px; }

/* ---------- Industries ---------- */
.industries-section {
  background: linear-gradient(180deg, var(--bg-soft) 0%, #fff 100%);
}
.industries-section .container {
  max-width: 1100px !important;
}
.industries-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 20px;
}
.industry-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}
.industry-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(13,71,161,0.12);
  border-color: var(--primary-light);
}
.industry-card-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f0f4fa;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.industry-card-img img {
  max-width: 80%;
  max-height: 80%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.industry-card:hover .industry-card-img img {
  transform: scale(1.06);
}
.industry-card-body {
  padding: 16px 18px 18px;
  text-align: center;
}
.industry-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0 0 6px;
  line-height: 1.3;
}
.industry-card-en {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 500;
  opacity: 0.8;
}

@media (max-width: 960px) {
  .industries-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}
@media (max-width: 640px) {
  .industries-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .industry-card-body { padding: 12px 14px 14px; }
  .industry-card-title { font-size: 14px; }
  .industry-card-en { font-size: 10px; letter-spacing: 0.5px; }
}

/* ---------- Contact ---------- */
.contact { background: var(--bg-soft); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
}
.contact-info h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 24px;
}
.contact-item {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  align-items: flex-start;
}
.contact-icon {
  width: 44px; height: 44px;
  background: rgba(13,71,161,0.1);
  color: var(--primary);
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 20px;
  flex-shrink: 0;
}
.contact-item h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}
.contact-item p {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.6;
}
.contact-form {
  background: #fff;
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color var(--transition);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13,71,161,0.1);
}
.form-group textarea { resize: vertical; min-height: 100px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.75);
  padding: 60px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .brand { color: #fff; margin-bottom: 16px; }
.footer-brand .brand-mark { background: var(--accent); }
.footer-brand p {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255,255,255,0.6);
  max-width: 280px;
}
.footer-col h4 {
  color: #fff;
  font-size: 15px;
  margin-bottom: 20px;
  font-weight: 600;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: var(--accent); }
.beian { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-visual { height: 300px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .menu-toggle { display: block; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 68px; left: 0; right: 0;
    flex-direction: column;
    background: #fff;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
  }
  section { padding: 56px 0; }
  .hero { min-height: 420px; }
  .hero-inner { padding: 60px 0; }
  .about-stats { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .stat-num { font-size: 24px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
