/* ========================================
   重工机械企业网站 - 主样式表
   配色：深海蓝 #1B3A5C / 钢蓝 #2C5F8A / 铸铜橙 #D4872C
   ======================================== */

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

:root {
  --primary: #1B3A5C;
  --primary-light: #2C5F8A;
  --accent: #D4872C;
  --accent-hover: #B8721F;
  --bg-white: #FFFFFF;
  --bg-light: #F5F6F8;
  --bg-dark: #1A1A2E;
  --text-primary: #1A1A2E;
  --text-secondary: #5A6070;
  --text-light: #FFFFFF;
  --text-light-muted: #A8ADBA;
  --border-color: #E2E5EA;
  --shadow-sm: 0 2px 8px rgba(27, 58, 92, 0.06);
  --shadow-md: 0 4px 16px rgba(27, 58, 92, 0.1);
  --shadow-lg: 0 8px 32px rgba(27, 58, 92, 0.14);
  --radius: 4px;
  --transition: 300ms ease-out;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Noto Sans SC', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-primary);
  background: var(--bg-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

ul, ol {
  list-style: none;
}

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

/* ========================================
   Navigation
   ======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  transition: box-shadow var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
  white-space: nowrap;
}

.nav-brand svg {
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-links a:hover {
  color: var(--primary-light);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.nav-phone svg {
  flex-shrink: 0;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: all var(--transition);
}

/* ========================================
   Hero Banner
   ======================================== */
.hero {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  background: var(--primary);
  overflow: hidden;
  margin-top: 72px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(135deg, rgba(27, 58, 92, 0.95) 0%, rgba(26, 26, 46, 0.85) 100%),
    url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%231B3A5C" width="1200" height="600"/><g opacity="0.08"><circle cx="200" cy="300" r="180" fill="none" stroke="%23fff" stroke-width="1"/><circle cx="200" cy="300" r="120" fill="none" stroke="%23fff" stroke-width="1"/><circle cx="200" cy="300" r="60" fill="none" stroke="%23fff" stroke-width="1"/><circle cx="900" cy="200" r="100" fill="none" stroke="%23fff" stroke-width="1"/><circle cx="900" cy="200" r="50" fill="none" stroke="%23fff" stroke-width="1"/><line x1="0" y1="500" x2="1200" y2="500" stroke="%23fff" stroke-width="0.5"/><line x1="0" y1="520" x2="1200" y2="520" stroke="%23fff" stroke-width="0.5"/><rect x="600" y="350" width="80" height="80" rx="2" fill="none" stroke="%23fff" stroke-width="1"/><rect x="620" y="370" width="40" height="40" rx="2" fill="none" stroke="%23fff" stroke-width="1"/></g></svg>');
  background-size: cover;
  background-position: center;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
  width: 100%;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(212, 135, 44, 0.15);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
  border: 1px solid rgba(212, 135, 44, 0.3);
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-light);
  line-height: 1.3;
  margin-bottom: 20px;
  max-width: 640px;
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-light-muted);
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 520px;
}

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

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--text-light);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-outline {
  background: transparent;
  color: var(--text-light);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.7);
}

.btn-primary-dark {
  background: var(--primary);
  color: var(--text-light);
}

.btn-primary-dark:hover {
  background: var(--primary-light);
}

/* ========================================
   Section Common
   ======================================== */
.section {
  padding: 80px 24px;
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.section-header p {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 560px;
}

.section-divider {
  width: 48px;
  height: 3px;
  background: var(--accent);
  margin-bottom: 16px;
}

.bg-light {
  background: var(--bg-light);
}

/* ========================================
   Products Grid
   ======================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.product-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.product-img {
  width: 100%;
  height: 220px;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-img .placeholder-icon {
  color: var(--primary);
  opacity: 0.25;
}

.product-body {
  padding: 24px;
}

.product-body h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.product-body p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.product-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-light);
  transition: all var(--transition);
}

.product-link:hover {
  color: var(--accent);
  gap: 10px;
}

/* ========================================
   About Section
   ======================================== */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-text h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
}

.about-text > p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 32px;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.stat-item {
  text-align: center;
  padding: 20px 12px;
  background: var(--bg-light);
  border-radius: var(--radius);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
  margin-bottom: 4px;
  font-family: 'Inter', sans-serif;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.about-image {
  width: 100%;
  height: 420px;
  background: var(--bg-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-image .placeholder-icon {
  color: var(--primary);
  opacity: 0.15;
}

/* ========================================
   Contact Section
   ======================================== */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 12px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-white);
  transition: border-color var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--primary-light);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-info h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.contact-info > p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.contact-detail {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-detail-icon {
  width: 44px;
  height: 44px;
  background: var(--bg-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--primary);
}

.contact-detail-text h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.contact-detail-text p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ========================================
   Footer
   ======================================== */
.footer {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 60px 24px 0;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-light);
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-light-muted);
  line-height: 1.7;
  max-width: 300px;
}

.footer-col h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-light);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-size: 0.875rem;
  color: var(--text-light-muted);
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  padding: 20px 0;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-light-muted);
}

/* ========================================
   Animations
   ======================================== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   Toast Message
   ======================================== */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--primary);
  color: var(--text-light);
  padding: 14px 28px;
  border-radius: var(--radius);
  font-size: 0.9375rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  opacity: 0;
  transition: all 0.4s ease-out;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-layout,
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image {
    height: 300px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .nav-links,
  .nav-phone {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  /* Mobile menu */
  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bg-white);
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    gap: 16px;
    box-shadow: var(--shadow-md);
  }

  .nav-phone.active {
    display: flex;
    position: absolute;
    top: calc(72px + var(--menu-height, 200px));
    left: 0;
    right: 0;
    background: var(--bg-white);
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
  }

  .hero {
    min-height: 480px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .section {
    padding: 60px 20px;
  }

  .section-header h2 {
    font-size: 1.5rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .about-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-content {
    padding: 60px 20px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.625rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }

  .stat-item {
    padding: 16px;
  }
}
