/* ============================================
   杭州保和科技有限公司 - 企业官网样式
   设计风格：科技现代、明亮清新、磨砂亚麻
   ============================================ */

/* --- CSS Variables --- */
:root {
  /* 画布底色 */
  --color-canvas: #fcfcfc;
  --color-canvas-alt: #f0f4fe;

  /* 文字色 */
  --color-text-primary: #020520;
  --color-text-secondary: #14141e;
  --color-text-muted: #696a72;
  --color-text-light: #95959b;

  /* 强调色 */
  --color-accent-blue: #145aff;
  --color-action: #0f1f3d;
  --color-success: #16ca2e;
  --color-danger: #f26052;

  /* 渐变 */
  --gradient-hero: radial-gradient(97.8% 181.6% at 53.7% 50%, rgb(20, 20, 30) 0%, rgba(88, 107, 141, 0.8) 100%);
  --gradient-btn-fill: linear-gradient(rgb(59, 130, 246) 0%, rgb(20, 90, 255) 100%);

  /* 圆角 */
  --radius-pill: 100px;
  --radius-card: 8px;
  --radius-block: 40px;
  --radius-image: 16px;

  /* 阴影 */
  --shadow-sm: rgba(0,0,0,0.1) 0px 0px 4px -2px;
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);

  /* 布局 */
  --container-max: 1200px;
  --section-gap: 80px;
  --nav-height: 72px;

  /* 字体 */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Roboto Mono', monospace;
}

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

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

body {
  font-family: var(--font-main);
  font-weight: 400;
  color: var(--color-text-primary);
  background-color: var(--color-canvas);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--color-action);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

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

ul, ol {
  list-style: none;
}

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

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text-primary);
}

h1 {
  font-size: 56px;
  letter-spacing: -0.03em;
}

h2 {
  font-size: 40px;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 28px;
  letter-spacing: -0.01em;
}

h4 {
  font-size: 22px;
}

p {
  line-height: 1.7;
  color: var(--color-text-muted);
}

.text-mono {
  font-family: var(--font-mono);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(252, 252, 252, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease;
}

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

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text-primary);
  text-decoration: none;
}

.nav-logo:hover {
  color: var(--color-text-primary);
}

.nav-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-btn-fill);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
}

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

.nav-links a {
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-muted);
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-text-primary);
  background: var(--color-canvas-alt);
}

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

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Nav */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(252, 252, 252, 0.98);
  backdrop-filter: blur(12px);
  z-index: 999;
  padding: 24px;
  flex-direction: column;
  gap: 8px;
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile a {
  padding: 16px 20px;
  font-size: 17px;
  font-weight: 500;
  color: var(--color-text-primary);
  border-radius: var(--radius-card);
  text-decoration: none;
  transition: background 0.2s ease;
}

.nav-mobile a:hover {
  background: var(--color-canvas-alt);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 500;
  font-family: var(--font-main);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
}

/* 轮廓按钮 (Primary) */
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--color-action);
  color: var(--color-action);
}

.btn-outline:hover {
  border-color: var(--color-text-primary);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-sm);
}

/* 填充按钮 (Gradient) */
.btn-fill {
  background: var(--gradient-btn-fill);
  border: none;
  color: #fff;
  box-shadow: 0 2px 8px rgba(20, 90, 255, 0.3);
}

.btn-fill:hover {
  box-shadow: 0 4px 16px rgba(20, 90, 255, 0.4);
  transform: translateY(-1px);
  color: #fff;
}

/* 幽灵按钮 (Ghost) */
.btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  backdrop-filter: blur(4px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
}

/* --- Section --- */
.section {
  padding: var(--section-gap) 0;
}

.section-alt {
  background: var(--color-canvas-alt);
}

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

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto;
}

.section-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

/* --- Hero Section --- */
.hero {
  background: var(--gradient-hero);
  padding: 160px 0 120px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(20, 90, 255, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  color: #fff;
  font-size: 56px;
  margin-bottom: 24px;
}

.hero p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 20px;
  margin-bottom: 40px;
  line-height: 1.6;
}

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

/* --- Cards --- */
.card {
  background: #fff;
  border-radius: var(--radius-card);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 32px;
  transition: all 0.3s ease;
}

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

.card-icon {
  width: 48px;
  height: 48px;
  background: var(--color-canvas-alt);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 24px;
}

.card h4 {
  margin-bottom: 12px;
  color: var(--color-text-primary);
}

.card p {
  font-size: 15px;
  margin-bottom: 16px;
}

.card-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-action);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.card-link:hover {
  color: var(--color-accent-blue);
}

.card-link::after {
  content: '\2192';
  transition: transform 0.2s ease;
}

.card-link:hover::after {
  transform: translateX(4px);
}

/* --- Grid Layouts --- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

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

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

/* --- Product Card --- */
.product-card {
  background: #fff;
  border-radius: var(--radius-card);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 28px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(20, 90, 255, 0.1);
}

.product-card-icon {
  width: 56px;
  height: 56px;
  background: var(--color-canvas-alt);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 28px;
}

.product-card h4 {
  margin-bottom: 10px;
}

.product-card p {
  font-size: 14px;
  flex-grow: 1;
  margin-bottom: 20px;
}

/* --- News Card --- */
.news-card {
  background: #fff;
  border-radius: var(--radius-card);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 28px;
  transition: all 0.3s ease;
}

.news-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.news-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--color-text-light);
}

.news-card-meta .tag {
  color: var(--color-accent-blue);
  font-weight: 500;
}

.news-card h4 {
  margin-bottom: 10px;
  font-size: 18px;
}

.news-card p {
  font-size: 14px;
  margin-bottom: 16px;
}

/* --- Client Logo Wall --- */
.client-wall {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 40px;
  padding: 40px 0;
}

.client-logo {
  width: 120px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-light);
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.client-logo:hover {
  opacity: 1;
}

/* --- Timeline --- */
.timeline {
  position: relative;
  padding: 20px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(0, 0, 0, 0.08);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 20px 40px;
}

.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
}

.timeline-item::before {
  content: '';
  position: absolute;
  top: 28px;
  width: 12px;
  height: 12px;
  background: var(--color-accent-blue);
  border-radius: 50%;
  border: 3px solid var(--color-canvas);
  box-shadow: 0 0 0 2px var(--color-accent-blue);
}

.timeline-item:nth-child(odd)::before {
  right: -6px;
}

.timeline-item:nth-child(even)::before {
  left: -6px;
}

.timeline-year {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-accent-blue);
  margin-bottom: 8px;
  font-family: var(--font-mono);
}

.timeline-content h4 {
  margin-bottom: 8px;
  font-size: 18px;
}

.timeline-content p {
  font-size: 14px;
}

/* --- Team --- */
.team-card {
  text-align: center;
  padding: 32px 24px;
  background: #fff;
  border-radius: var(--radius-card);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.team-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--color-canvas-alt);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: var(--color-text-light);
}

.team-card h4 {
  margin-bottom: 4px;
  font-size: 18px;
}

.team-card .role {
  font-size: 14px;
  color: var(--color-accent-blue);
  font-weight: 500;
  margin-bottom: 12px;
}

.team-card p {
  font-size: 14px;
}

/* --- Form --- */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  font-family: var(--font-main);
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-card);
  background: #fff;
  color: var(--color-text-primary);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--color-accent-blue);
  box-shadow: 0 0 0 3px rgba(20, 90, 255, 0.1);
}

.form-input.error,
.form-textarea.error {
  border-color: var(--color-danger);
}

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

.form-error {
  font-size: 13px;
  color: var(--color-danger);
  margin-top: 6px;
  display: none;
}

.form-error.visible {
  display: block;
}

.form-success {
  padding: 16px 20px;
  background: rgba(22, 202, 46, 0.08);
  border: 1px solid rgba(22, 202, 46, 0.2);
  border-radius: var(--radius-card);
  color: #0a7a1a;
  font-size: 15px;
  display: none;
}

.form-success.visible {
  display: block;
}

/* --- Footer --- */
.footer {
  background: var(--color-text-primary);
  color: rgba(255, 255, 255, 0.7);
  padding: 64px 0 32px;
}

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

.footer-brand p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  margin-top: 16px;
  line-height: 1.7;
}

.footer h5 {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 20px;
}

.footer-links a {
  display: block;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  padding: 4px 0;
  transition: color 0.2s ease;
  text-decoration: none;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* --- Page Header --- */
.page-header {
  padding: 140px 0 60px;
  background: var(--color-canvas-alt);
  text-align: center;
}

.page-header h1 {
  font-size: 48px;
  margin-bottom: 16px;
}

.page-header p {
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto;
}

/* --- Breadcrumb --- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--color-text-light);
  margin-bottom: 24px;
}

.breadcrumb a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--color-accent-blue);
}

.breadcrumb span {
  color: var(--color-text-light);
}

/* --- Detail Page --- */
.detail-hero {
  padding: 140px 0 60px;
  background: var(--color-canvas-alt);
}

.detail-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 0;
}

.detail-content h2 {
  font-size: 28px;
  margin: 40px 0 16px;
}

.detail-content h3 {
  font-size: 22px;
  margin: 32px 0 12px;
}

.detail-content p {
  margin-bottom: 16px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text-secondary);
}

.detail-content ul {
  margin-bottom: 16px;
  padding-left: 20px;
}

.detail-content ul li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 8px;
  font-size: 16px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.detail-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent-blue);
}

/* --- Specs Table --- */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
}

.specs-table th,
.specs-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.specs-table th {
  background: var(--color-canvas-alt);
  font-weight: 600;
  color: var(--color-text-primary);
  font-size: 14px;
}

.specs-table td {
  color: var(--color-text-secondary);
}

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

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.contact-item-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: var(--color-canvas-alt);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.contact-item h5 {
  font-size: 15px;
  margin-bottom: 4px;
}

.contact-item p {
  font-size: 14px;
  color: var(--color-text-muted);
}

/* --- Map Placeholder --- */
.map-placeholder {
  width: 100%;
  height: 300px;
  background: var(--color-canvas-alt);
  border-radius: var(--radius-image);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-size: 14px;
  margin-top: 40px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* --- CTA Section --- */
.cta-section {
  background: var(--gradient-hero);
  padding: 80px 0;
  text-align: center;
}

.cta-section h2 {
  color: #fff;
  margin-bottom: 16px;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Related Cards --- */
.related-section {
  padding: 60px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.related-section h3 {
  margin-bottom: 24px;
}

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

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

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

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

@media (max-width: 768px) {
  :root {
    --section-gap: 48px;
    --nav-height: 64px;
  }

  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 28px;
  }

  .hero {
    padding: 120px 0 80px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero p {
    font-size: 17px;
  }

  .nav-links {
    display: none;
  }

  .nav-cta .btn {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .contact-info {
    grid-template-columns: 1fr;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item {
    width: 100%;
    left: 0 !important;
    padding-left: 50px;
    padding-right: 0;
    text-align: left !important;
  }

  .timeline-item::before {
    left: 14px !important;
    right: auto !important;
  }

  .page-header h1 {
    font-size: 32px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .client-wall {
    gap: 24px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  h1 {
    font-size: 28px;
  }

  .card {
    padding: 24px;
  }
}
