/* ============ Haohai Precision Machinery — Site Styles ============ */

:root {
  --navy: #0e2a43;
  --navy-deep: #091d30;
  --blue: #1a5fa8;
  --blue-bright: #2e7cd6;
  --accent: #e8842a;
  --ink: #1c2b39;
  --ink-soft: #4a5b6a;
  --bg: #ffffff;
  --bg-alt: #f4f7fa;
  --line: #dfe6ed;
  --radius: 10px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.5px;
  border-radius: 8px;
}

.logo-text {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.1;
  display: flex;
  flex-direction: column;
}

.logo-sub {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

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

.main-nav a {
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover { color: var(--blue); }

.main-nav a.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 10px 20px !important;
  border-radius: 6px;
  border-bottom: none !important;
}

.nav-cta:hover { background: #d0711d !important; color: #fff !important; }

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(120deg, rgba(14,42,67,0.96) 0%, rgba(26,95,168,0.88) 60%, rgba(46,124,214,0.82) 100%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.035) 0 12px, transparent 12px 24px);
  color: #fff;
  padding: 96px 0 72px;
}

.hero-kicker {
  display: inline-block;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.15;
  font-weight: 800;
  max-width: 720px;
  margin-bottom: 20px;
}

.hero-lead {
  font-size: 18px;
  max-width: 640px;
  color: rgba(255,255,255,0.88);
  margin-bottom: 34px;
}

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

.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 16px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #d0711d;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(232,132,42,0.35);
}

.btn-outline {
  border: 2px solid rgba(255,255,255,0.6);
  color: #fff;
}

.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.btn-light {
  background: #fff;
  color: var(--navy);
}

.btn-light:hover {
  background: #f0f4f8;
  color: var(--navy);
  transform: translateY(-2px);
}

.btn-block { display: block; text-align: center; margin-top: 26px; }

.hero-stats {
  display: flex;
  gap: 48px;
  margin-top: 56px;
  flex-wrap: wrap;
}

.stat { display: flex; flex-direction: column; }

.stat-num {
  font-size: 38px;
  font-weight: 800;
  color: #fff;
}

.stat-num .stat-unit { font-size: 20px; font-weight: 600; }

.stat-label {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.3px;
}

/* ---------- Page head (subpages) ---------- */
.page-head {
  background:
    linear-gradient(120deg, rgba(14,42,67,0.96), rgba(26,95,168,0.9)),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.035) 0 12px, transparent 12px 24px);
  color: #fff;
  padding: 64px 0 48px;
}

.page-head h1 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  margin-bottom: 10px;
}

.page-head p {
  color: rgba(255,255,255,0.85);
  font-size: 17px;
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }

.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }

.section-head h2 {
  font-size: 32px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 12px;
}

.section-head p { color: var(--ink-soft); font-size: 17px; }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: all 0.25s ease;
}

.card:hover {
  border-color: var(--blue-bright);
  box-shadow: 0 12px 30px rgba(14,42,67,0.10);
  transform: translateY(-4px);
}

.card-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  color: var(--blue);
  font-size: 24px;
  border-radius: 10px;
  margin-bottom: 18px;
}

.card h3 {
  font-size: 19px;
  color: var(--navy);
  margin-bottom: 10px;
}

.card p { font-size: 15px; color: var(--ink-soft); }

/* ---------- Feature list ---------- */
.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.feature {
  background: #fff;
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 24px 26px;
  box-shadow: 0 2px 10px rgba(14,42,67,0.05);
}

.feature h3 {
  color: var(--navy);
  font-size: 18px;
  margin-bottom: 8px;
}

.feature p { font-size: 15px; color: var(--ink-soft); }

/* ---------- Industry tags ---------- */
.industry-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.industry-tags span {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--navy);
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 15px;
  transition: all 0.2s ease;
}

.industry-tags span:hover {
  border-color: var(--blue-bright);
  color: var(--blue);
  background: var(--bg-alt);
}

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--navy) 0%, var(--blue) 100%);
  color: #fff;
  text-align: center;
  padding: 64px 0;
}

.cta-band h2 {
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 10px;
}

.cta-band p {
  color: rgba(255,255,255,0.85);
  margin-bottom: 28px;
  font-size: 17px;
}

.cta-band .btn { margin-top: 0; }

/* ---------- Products ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  border-color: var(--blue-bright);
  box-shadow: 0 14px 34px rgba(14,42,67,0.12);
  transform: translateY(-4px);
}

.product-visual {
  height: 170px;
  position: relative;
}

.pv-1 { background: linear-gradient(135deg, #23384d 0%, #3d6285 55%, #5b84ac 100%); }
.pv-2 { background: linear-gradient(135deg, #2d4a68 0%, #4a7396 55%, #6f97b8 100%); }
.pv-3 { background: linear-gradient(135deg, #1f3348 0%, #35597c 55%, #527ba1 100%); }
.pv-4 { background: linear-gradient(135deg, #2a4159 0%, #44688c 55%, #6388ab 100%); }

.product-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 28px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 28px);
}

.product-body { padding: 26px; flex: 1; }

.product-body h2 {
  font-size: 21px;
  color: var(--navy);
  margin-bottom: 10px;
}

.product-body > p { font-size: 15px; color: var(--ink-soft); margin-bottom: 14px; }

.spec-list {
  list-style: none;
  margin-top: auto;
}

.spec-list li {
  font-size: 14px;
  color: var(--ink);
  padding: 6px 0 6px 26px;
  position: relative;
  border-top: 1px dashed var(--line);
}

.spec-list li:first-child { border-top: none; }

.spec-list li::before {
  content: "\25B8";
  position: absolute;
  left: 6px;
  color: var(--accent);
  font-size: 13px;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}

.about-text h2 {
  color: var(--navy);
  font-size: 26px;
  margin: 30px 0 14px;
}

.about-text h2:first-child { margin-top: 0; }

.about-text p { color: var(--ink-soft); margin-bottom: 14px; font-size: 16px; }

.value-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.value-item {
  background: var(--bg-alt);
  border-radius: 8px;
  padding: 18px;
}

.value-item h3 {
  color: var(--blue);
  font-size: 16px;
  margin-bottom: 6px;
}

.value-item p { font-size: 14px !important; margin: 0 !important; }

.about-facts {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--line);
  position: sticky;
  top: 96px;
}

.about-facts h3 {
  color: var(--navy);
  font-size: 18px;
  margin-bottom: 14px;
}

.about-facts h3 + .fact-table { margin-top: 0; }

.fact-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 26px;
}

.fact-table th, .fact-table td {
  text-align: left;
  font-size: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.fact-table th {
  color: var(--ink-soft);
  font-weight: 600;
  white-space: nowrap;
  padding-right: 16px;
}

.fact-table td { color: var(--ink); font-weight: 500; }

.fact-note { font-size: 14px; color: var(--ink-soft); }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: start;
}

.contact-info h2 {
  color: var(--navy);
  font-size: 22px;
  margin: 28px 0 12px;
}

.contact-info h2:first-child { margin-top: 0; }

.contact-info > p { color: var(--ink-soft); font-size: 15px; margin-bottom: 6px; }

.contact-line {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

a.contact-line:hover {
  border-color: var(--blue-bright);
  color: var(--ink);
  background: var(--bg-alt);
}

.contact-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: #fff;
  border-radius: 8px;
  font-size: 17px;
}

.contact-line small { color: var(--ink-soft); }

.contact-panel {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 34px 32px;
}

.contact-panel h2 {
  font-size: 23px;
  margin-bottom: 22px;
}

.quote-steps {
  list-style: none;
  counter-reset: step;
}

.quote-steps li {
  counter-increment: step;
  position: relative;
  padding-left: 52px;
  margin-bottom: 20px;
}

.quote-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 16px;
}

.quote-steps strong { display: block; font-size: 16px; margin-bottom: 4px; }

.quote-steps p {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,0.8);
  padding: 56px 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1.4fr;
  gap: 40px;
  padding-bottom: 40px;
}

.logo-footer .logo-text { color: #fff; }
.logo-footer .logo-sub { color: rgba(255,255,255,0.6); }

.footer-desc {
  margin-top: 16px;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  max-width: 300px;
}

.footer-col h4 {
  color: #fff;
  font-size: 15px;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.footer-col a {
  display: block;
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  padding: 5px 0;
}

.footer-col a:hover { color: #fff; }

.footer-note { font-size: 14px; color: rgba(255,255,255,0.55); padding-top: 5px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 18px 24px;
}

.footer-bottom p {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .about-facts { position: static; }
  .hero { padding: 64px 0 56px; }
  .hero-stats { gap: 32px; }
}

@media (max-width: 700px) {
  .header-inner { flex-direction: column; height: auto; padding: 16px 24px; gap: 12px; }
  .main-nav { flex-wrap: wrap; justify-content: center; gap: 18px; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .section { padding: 52px 0; }
}
