/* === IRED IoT - 共享自定义样式 (基于 Tailwind) === */

/* === 本地 Inter 字体 === */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --primary: #0A2E5C;
  --primary-hover: #0d3a73;
  --secondary: #1E5FBF;
  --accent: #FF6B35;
  --accent-hover: #e55a2b;
  --radius: 0.5rem;
}

/* === 全局重置与排版 === */
html { scroll-behavior: smooth; }
body { font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif; }

/* === 导航栏 === */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: all 0.3s ease;
}
.navbar.scrolled { box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

.nav-link {
  position: relative;
  color: #374151;
  font-weight: 500;
  font-size: 0.925rem;
  transition: color 0.2s;
  padding: 0.5rem 0;
}
.nav-link:hover { color: var(--primary); }
.nav-link.active { color: var(--primary); }
.nav-link::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 2px; background: var(--primary);
  transform: scaleX(0); transition: transform 0.25s ease;
}
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }

/* === 按钮 === */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.625rem 1.5rem;
  font-weight: 600; font-size: 0.95rem;
  border-radius: var(--radius);
  transition: all 0.2s ease;
  cursor: pointer; text-decoration: none;
  gap: 0.5rem;
}
.btn-primary {
  background: var(--primary); color: #fff;
  border: 1px solid var(--primary);
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(10,46,92,0.3); }
.btn-accent {
  background: var(--accent); color: #fff;
  border: 1px solid var(--accent);
}
.btn-accent:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,107,53,0.3); }
.btn-outline {
  background: transparent; color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; transform: translateY(-1px); }
.btn-white {
  background: #fff; color: var(--primary);
  border: 1px solid #fff;
}
.btn-white:hover { background: #f9fafb; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.btn-lg { padding: 0.75rem 2rem; font-size: 1.05rem; }

/* === 区域标题 === */
.section-badge {
  display: inline-block;
  background: rgba(30,95,191,0.1);
  color: var(--secondary);
  font-size: 0.85rem; font-weight: 600;
  padding: 0.3rem 0.875rem;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
}
.section-title {
  font-size: 2.25rem; font-weight: 800;
  color: #111827;
  line-height: 1.2;
  margin-bottom: 1rem;
}
@media (min-width: 768px) { .section-title { font-size: 2.75rem; } }
@media (min-width: 1024px) { .section-title { font-size: 3rem; } }

.section-subtitle {
  font-size: 1.1rem; color: #6b7280;
  max-width: 640px; margin: 0 auto;
  line-height: 1.65;
}
@media (min-width: 768px) { .section-subtitle { font-size: 1.15rem; } }

/* === 卡片 === */
.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  border-color: #d1d5db;
}
.card-body { padding: 1.5rem; }

/* === 毛玻璃效果 === */
.glass {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0,0,0,0.06);
}

/* === 滚动动画 === */
.anim-up {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.anim-up.visible { opacity: 1; transform: translateY(0); }

.anim-up.d1 { transition-delay: 0.1s; }
.anim-up.d2 { transition-delay: 0.2s; }
.anim-up.d3 { transition-delay: 0.3s; }
.anim-up.d4 { transition-delay: 0.4s; }
.anim-up.d5 { transition-delay: 0.5s; }

/* === 渐变覆盖层 === */
.overlay-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(10,46,92,0.9), rgba(10,46,92,0.7), transparent);
}

/* === 表单 === */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: var(--radius);
  font-size: 0.95rem;
  transition: all 0.2s;
  background: #fff;
  font-family: inherit;
}
.form-input:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(30,95,191,0.15);
}
.form-input::placeholder { color: #9ca3af; }

textarea.form-input { resize: vertical; min-height: 120px; }

select.form-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2.5rem; }

/* === 页脚 === */
.footer { background: var(--primary); color: #e5e7eb; }
.footer a { color: #9ca3af; transition: color 0.2s; }
.footer a:hover { color: #fff; }
.footer-heading {
  color: #fff; font-weight: 700; font-size: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

/* === Hero 数字计数动画 === */
.stat-number {
  font-size: 2.25rem; font-weight: 800;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
@media (min-width: 768px) { .stat-number { font-size: 2.75rem; } }

/* === 图标容器 === */
.icon-box {
  width: 3rem; height: 3rem;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.icon-box-primary { background: rgba(10,46,92,0.1); color: var(--primary); }
.icon-box-secondary { background: rgba(30,95,191,0.1); color: var(--secondary); }
.icon-box-accent { background: rgba(255,107,53,0.1); color: var(--accent); }

/* === 标签徽章 === */
.tag {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  font-size: 0.8rem; font-weight: 500;
  border-radius: 9999px;
}
.tag-primary { background: rgba(10,46,92,0.08); color: var(--primary); }
.tag-accent { background: rgba(255,107,53,0.1); color: var(--accent); }
.tag-secondary { background: rgba(30,95,191,0.08); color: var(--secondary); }
.tag-green { background: rgba(22,163,74,0.1); color: #16a34a; }

/* === 案例结果数据 === */
.result-value {
  font-size: 1.75rem; font-weight: 800;
  color: var(--accent);
}
.result-label {
  font-size: 0.85rem; color: #6b7280;
}

/* === 移动端菜单 === */
@media (max-width: 767px) {
  .mobile-menu { display: none; }
  .mobile-menu.open { display: flex; }
}
