/* ====================================================
   Guangzhou Fengren Machinery — Redesigned Stylesheet
   ==================================================== */

:root {
  --primary: #1a365d;
  --primary-dark: #0f2744;
  --primary-light: #2c5282;
  --accent: #c53030;
  --accent-light: #e53e3e;
  --text: #1a202c;
  --text-light: #4a5568;
  --text-muted: #718096;
  --bg: #ffffff;
  --bg-light: #f7fafc;
  --bg-gray: #edf2f7;
  --bg-dark: #0f2744;
  --border: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
  --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.15);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --max-width: 1200px;
  --header-height: 100px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

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

.section { padding: 80px 0; }

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

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(229,62,62,0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--primary);
  background: var(--bg-light);
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  z-index: 1000;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo { display: flex; align-items: center; gap: 12px; }

.logo-icon { width: auto; height: 82px; flex-shrink: 0; }
.logo-icon img { width: auto; height: 100%; display: block; }

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

.nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-light);
  transition: color 0.2s;
  position: relative;
}
.nav a:hover { color: var(--accent); }

.nav a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  bottom: -6px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.3s;
}
.nav a:not(.nav-cta):hover::after { width: 100%; }

.nav-cta {
  padding: 10px 24px !important;
  background: var(--accent) !important;
  color: white !important;
  border-radius: var(--radius) !important;
  font-weight: 600 !important;
}
.nav-cta:hover {
  background: var(--accent-light) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(229,62,62,0.3);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.mobile-menu-btn span {
  display: block;
  width: 24px; height: 2px;
  background: var(--primary);
  transition: all 0.3s;
}

/* ===== Hero ===== */
.hero {
  padding-top: calc(var(--header-height) + 40px);
  padding-bottom: 60px;
  background: linear-gradient(180deg, var(--bg-light) 0%, #ffffff 100%);
  overflow: hidden;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-left { max-width: 560px; }

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--bg-gray);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 24px;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--primary);
  margin-bottom: 20px;
}
.hero-title .accent { color: var(--accent); }

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 24px;
}

.hero-points {
  list-style: none;
  margin-bottom: 32px;
}
.hero-points li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
  font-size: 1rem;
  color: var(--text);
  font-weight: 500;
}
.hero-points li::before {
  content: "";
  position: absolute;
  left: 0; top: 6px;
  width: 18px; height: 18px;
  background: var(--accent);
  border-radius: 50%;
}
.hero-points li::after {
  content: "\2713";
  position: absolute;
  left: 3px; top: 4px;
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
}

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

.hero-right {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  aspect-ratio: 4/3;
}
.hero-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== Stats ===== */
.stats {
  background: var(--bg-dark);
  padding: 48px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-item {
  position: relative;
}
.stat-item:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -12px; top: 50%;
  transform: translateY(-50%);
  width: 1px; height: 48px;
  background: rgba(255,255,255,0.1);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ===== About ===== */
.about { background: var(--bg); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/3;
}
.about-image img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.about-content h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.about-content p {
  color: var(--text-light);
  margin-bottom: 16px;
  line-height: 1.8;
}

.philosophy {
  display: inline-block;
  padding: 16px 24px;
  background: var(--bg-light);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-top: 16px;
}
.philosophy strong {
  display: block;
  color: var(--accent);
  font-size: 1.2rem;
  margin-bottom: 4px;
}
.philosophy span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== Business Scope ===== */
.business { background: var(--bg-light); }

.business-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.business-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid var(--border);
  overflow: hidden;
}
.business-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.business-image {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-gray);
}
.business-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.business-card:hover .business-image img {
  transform: scale(1.08);
}

.business-body {
  padding: 24px;
}
.business-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}
.business-body p {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* ===== Products ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.product-card {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid var(--border);
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.product-image {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.product-image.contain img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 16px;
}
.product-card:hover .product-image img {
  transform: scale(1.08);
}
.product-card:hover .product-image.contain img {
  transform: scale(1.04);
}

.product-info { padding: 24px; }
.product-info h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}
.product-info p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ===== Sensors ===== */
.sensors {
  background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-gray) 100%);
}

.sensors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.sensor-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.3s;
}
.sensor-card:hover { transform: translateY(-6px); }

.sensor-image {
  width: 180px; height: 180px;
  margin: 0 auto 24px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-light);
  border: 4px solid white;
  box-shadow: var(--shadow);
}
.sensor-image img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.sensor-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}
.sensor-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ===== Quality ===== */
.quality { background: var(--bg); }

.quality-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.quality-image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/3;
}
.quality-image img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.quality-content h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.quality-content > p {
  color: var(--text-light);
  margin-bottom: 28px;
  line-height: 1.8;
}

.quality-list {
  list-style: none;
}
.quality-list li {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}
.quality-list .check {
  flex-shrink: 0;
  width: 32px; height: 32px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  margin-top: 2px;
}
.quality-list strong {
  display: block;
  font-size: 1.05rem;
  color: var(--primary);
  margin-bottom: 4px;
}
.quality-list p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===== Process ===== */
.process {
  background: var(--bg-dark);
  color: white;
}
.process .section-title { color: white; }
.process .section-subtitle { color: rgba(255,255,255,0.6); }
.process .section-tag { color: var(--accent-light); }

.process-grid {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
}

.process-step {
  flex: 1;
  max-width: 300px;
  text-align: center;
  padding: 32px 24px;
}

.step-number {
  font-size: 3rem;
  font-weight: 800;
  color: rgba(255,255,255,0.15);
  margin-bottom: 16px;
  line-height: 1;
}

.process-step h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
}
.process-step p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
}

.process-arrow {
  display: flex;
  align-items: center;
  font-size: 2rem;
  color: rgba(255,255,255,0.2);
  padding: 0 8px;
}

/* ===== Applications ===== */
.applications { background: var(--bg-light); }

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

.app-tile {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  aspect-ratio: 4/3;
  min-height: 180px;
  box-shadow: var(--shadow);
}
.app-tile img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.app-tile::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(180deg, rgba(15,39,68,0.05) 0%, rgba(15,39,68,0.75) 100%);
  transition: opacity 0.3s;
}
.app-tile:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.app-tile:hover img {
  transform: scale(1.1);
}

.app-tile-body {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 20px 18px;
  z-index: 2;
}

.app-tile h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.app-tile p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.35;
}

@media (max-width: 1200px) {
  .apps-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
  .apps-grid { grid-template-columns: 1fr; }
  .app-tile { aspect-ratio: 16/10; }
}

/* ===== Contact ===== */
.contact { background: var(--bg); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

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

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

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

.contact-item h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
}
.contact-item p {
  font-size: 0.95rem;
  color: var(--text-light);
}

.contact-qr {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  text-align: center;
}
.contact-qr img {
  width: 200px; height: 200px;
  margin: 0 auto 20px;
  border-radius: var(--radius);
}
.contact-qr h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}
.contact-qr p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.6);
  padding: 64px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-logo {
  height: 72px;
  width: auto;
  margin-bottom: 16px;
  background: white;
  padding: 12px 20px;
  border-radius: var(--radius-md);
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 300px;
}

.footer-col h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}
.footer-col li {
  margin-bottom: 10px;
  font-size: 0.9rem;
}
.footer-col a {
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
}
.footer-col a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  text-align: center;
}
.footer-bottom p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .hero-container,
  .about-grid,
  .quality-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-right { order: -1; }

  .hero-title { font-size: 2.5rem; }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
  .stat-item:nth-child(2)::after { display: none; }

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

  .process-grid {
    flex-direction: column;
    gap: 16px;
  }
  .process-arrow {
    transform: rotate(90deg);
    padding: 8px 0;
  }
  .process-step {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0; right: 0;
    background: white;
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    box-shadow: var(--shadow-lg);
    border-top: 1px solid var(--border);
  }
  .nav.active { display: flex; }
  .nav-cta { text-align: center; }

  .mobile-menu-btn { display: flex; }

  :root { --header-height: 76px; }
  .logo-icon { height: 56px; }

  .hero { padding-top: calc(var(--header-height) + 24px); }
  .hero-title { font-size: 2rem; }
  .hero-desc { font-size: 1rem; }

  .section { padding: 60px 0; }
  .section-title { font-size: 1.6rem; }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  .btn { width: 100%; max-width: 320px; margin: 0 auto; }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .stat-item::after { display: none !important; }
  .stat-number { font-size: 2rem; }

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