/* ===================================================================
 * 济南合煦智能科技有限公司 — 布局系统
 * 文件：layout.css
 * 说明：导航栏、页脚、页面区块布局
 * =================================================================== */

/* ===================================================================
 * 1. 导航栏
 * =================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-fixed);
  padding: var(--space-4) 0;
  transition: all var(--duration-base) var(--ease-out);
}

.navbar.scrolled {
  padding: var(--space-3) 0;
  background: hsla(220, 30%, 6%, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-1);
  box-shadow: var(--shadow-md);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* --- Logo --- */
.navbar__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--text-1);
  flex-shrink: 0;
}

.navbar__logo-img {
  height: 36px;
  width: auto;
}

.navbar__logo-text {
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

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

/* --- 导航菜单 --- */
.navbar__menu {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.navbar__link {
  position: relative;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--duration-fast) var(--ease-out);
}

.navbar__link:hover {
  color: var(--text-1);
  background: hsla(0, 0%, 100%, 0.05);
}

.navbar__link.active {
  color: var(--primary-light);
}

.navbar__link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

/* --- CTA 按钮 --- */
.navbar__cta {
  margin-left: var(--space-4);
}

/* --- 汉堡菜单（移动端） --- */
.navbar__toggle {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.navbar__toggle-bar {
  width: 22px;
  height: 2px;
  background: var(--text-1);
  border-radius: 2px;
  transition: all var(--duration-base) var(--ease-out);
}

.navbar__toggle.active .navbar__toggle-bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.navbar__toggle.active .navbar__toggle-bar:nth-child(2) {
  opacity: 0;
}

.navbar__toggle.active .navbar__toggle-bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- 移动端菜单 --- */
@media (max-width: 1023px) {
  .navbar__toggle {
    display: flex;
  }

  .navbar__menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100vh;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-1);
    padding: var(--space-20) var(--space-6) var(--space-6);
    background: var(--bg-2);
    border-left: 1px solid var(--border-1);
    transform: translateX(100%);
    transition: transform var(--duration-slow) var(--ease-out);
    z-index: var(--z-fixed);
  }

  .navbar__menu.open {
    transform: translateX(0);
  }

  .navbar__link {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
  }

  .navbar__link.active::after {
    display: none;
  }

  .navbar__cta {
    margin-left: 0;
    margin-top: var(--space-4);
  }
}

/* ===================================================================
 * 2. Hero 区域
 * =================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 80px;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: var(--z-below);
}

.hero__bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 50%, hsla(var(--primary-h), 60%, 20%, 0.3), transparent),
    radial-gradient(ellipse 50% 50% at 80% 30%, hsla(var(--accent-h), 60%, 15%, 0.2), transparent),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
}

.hero__particles {
  position: absolute;
  inset: 0;
}

.hero__content {
  position: relative;
  z-index: var(--z-base);
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

.hero__text {
  max-width: 600px;
}

.hero__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary-light);
  background: hsla(var(--primary-h), var(--primary-s), 50%, 0.1);
  border: 1px solid hsla(var(--primary-h), var(--primary-s), 50%, 0.2);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-6);
}

.hero__title {
  font-size: var(--text-6xl);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: var(--space-6);
  background: linear-gradient(135deg, var(--text-1) 0%, var(--primary-light) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: var(--text-lg);
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: var(--space-8);
}

.hero__actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.hero__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hero__product-img {
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 40px hsla(var(--primary-h), var(--primary-s), 30%, 0.4));
  animation: floatProduct 6s ease-in-out infinite;
}

@keyframes floatProduct {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* --- 产品光环 --- */
.hero__product-glow {
  position: absolute;
  width: 80%;
  height: 40%;
  bottom: 10%;
  left: 10%;
  background: radial-gradient(ellipse, hsla(var(--primary-h), var(--primary-s), 50%, 0.2), transparent 70%);
  filter: blur(30px);
  animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@media (max-width: 1023px) {
  .hero__content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-10);
  }

  .hero__text {
    max-width: none;
  }

  .hero__title {
    font-size: var(--text-4xl);
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__visual {
    order: -1;
  }

  .hero__product-img {
    max-width: 70%;
  }
}

@media (max-width: 767px) {
  .hero {
    min-height: auto;
    padding-top: 100px;
    padding-bottom: var(--space-12);
  }

  .hero__title {
    font-size: var(--text-3xl);
  }
}

/* ===================================================================
 * 3. 页脚
 * =================================================================== */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border-1);
  padding-top: var(--space-16);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.footer__brand-desc {
  font-size: var(--text-sm);
  color: var(--text-3);
  line-height: 1.8;
  margin-top: var(--space-4);
  max-width: 360px;
}

.footer__heading {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-5);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer__link {
  font-size: var(--text-sm);
  color: var(--text-3);
  text-decoration: none;
  transition: color var(--duration-fast);
}

.footer__link:hover {
  color: var(--primary-light);
}

.footer__contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--text-3);
  margin-bottom: var(--space-3);
}

.footer__contact-item svg {
  width: 16px;
  height: 16px;
  color: var(--primary-light);
  flex-shrink: 0;
  margin-top: 3px;
}

/* --- 底部版权栏 --- */
.footer__bottom {
  border-top: 1px solid var(--border-1);
  padding: var(--space-5) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__copyright {
  font-size: var(--text-xs);
  color: var(--text-4);
  cursor: default;
}

.footer__icp {
  font-size: var(--text-xs);
  color: var(--text-4);
}

.footer__icp a {
  color: var(--text-4);
}

.footer__icp a:hover {
  color: var(--text-3);
}

@media (max-width: 1023px) {
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
  }
}

@media (max-width: 767px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }

  .footer__bottom {
    flex-direction: column;
    gap: var(--space-2);
    text-align: center;
  }
}

/* ===================================================================
 * 4. 解决方案网格
 * =================================================================== */
.solutions-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-6);
}

.solution-card {
  width: calc(33.333% - var(--space-6) * 2 / 3);
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  transition: all var(--duration-base) var(--ease-out);
}

.solution-card:hover {
  transform: translateY(-6px);
  border-color: var(--glass-border-hover);
  box-shadow: var(--shadow-glow);
}

.solution-card__img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.solution-card:hover .solution-card__img {
  transform: scale(1.08);
}

.solution-card__overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(180deg, transparent 30%, hsla(220, 30%, 6%, 0.8) 100%);
}

.solution-card__body {
  padding: var(--space-6);
}

.solution-card__title {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.solution-card__desc {
  font-size: var(--text-sm);
  color: var(--text-3);
  line-height: 1.7;
  margin-bottom: var(--space-4);
}

.solution-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

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

@media (max-width: 767px) {
  .solutions-grid {
    grid-template-columns: 1fr;
  }
}

/* ===================================================================
 * 5. 统计区域
 * =================================================================== */
.stats-section {
  position: relative;
  padding: var(--space-16) 0;
  background: var(--bg-2);
  overflow: hidden;
}

.stats-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 80% at 50% 50%, hsla(var(--primary-h), 50%, 20%, 0.15), transparent);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
  position: relative;
}

.stats-grid .stat {
  position: relative;
}

.stats-grid .stat::after {
  content: '';
  position: absolute;
  right: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: var(--border-1);
}

.stats-grid .stat:last-child::after {
  display: none;
}

@media (max-width: 1023px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-grid .stat:nth-child(2)::after {
    display: none;
  }
}

@media (max-width: 767px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }
}

/* ===================================================================
 * 6. 页面通用 Hero（内页）
 * =================================================================== */
.page-hero {
  position: relative;
  padding: calc(80px + var(--space-16)) 0 var(--space-16);
  background: var(--bg-2);
  overflow: hidden;
  text-align: center;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 50% 0%, hsla(var(--primary-h), 60%, 15%, 0.3), transparent);
}

.page-hero__title {
  position: relative;
  font-size: var(--text-5xl);
  font-weight: 900;
  margin-bottom: var(--space-4);
  background: linear-gradient(135deg, var(--text-1), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-hero__desc {
  position: relative;
  font-size: var(--text-lg);
  color: var(--text-3);
  max-width: 600px;
  margin: 0 auto;
}

/* --- 面包屑 --- */
.breadcrumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
  font-size: var(--text-sm);
  color: var(--text-3);
}

.breadcrumb a {
  color: var(--text-3);
}

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

.breadcrumb__sep {
  color: var(--text-4);
}
