/* ============================================================
   良风网络科技 官网样式
   技术栈：纯 CSS3（无框架 / 无预处理器）
   设计规范：蓝色-青色科技渐变主色，PC / 平板 / 手机三档响应式
   ============================================================ */

/* ---------- CSS 变量：统一管理配色与尺寸，便于主题调整 ---------- */
:root {
  --primary: #1663d7;        /* 主色：科技蓝 */
  --primary-dark: #0d47a1;
  --accent: #06c2c2;         /* 辅助色：青色 */
  --gradient: linear-gradient(135deg, #1663d7 0%, #06b6d4 100%);
  --text-main: #1f2d3d;      /* 正文主色 */
  --text-sub: #5b6b80;       /* 次要文字 */
  --bg-light: #f5f8fc;       /* 浅灰蓝背景（隔段使用） */
  --white: #ffffff;
  --card-shadow: 0 10px 30px rgba(22, 99, 215, 0.08);
  --card-shadow-hover: 0 18px 40px rgba(22, 99, 215, 0.18);
  --radius: 14px;
  --nav-height: 68px;
}

/* ---------- 基础重置 ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }              /* 锚点跳转平滑滚动 */
/* 锚点定位时为吸顶导航预留空间，避免标题被遮挡 */
section[id] { scroll-margin-top: var(--nav-height); }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text-main);
  line-height: 1.7;
  overflow-x: hidden;                          /* 防止装饰元素撑出横向滚动条 */
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
.container { width: min(1180px, 92%); margin: 0 auto; }

/* ============================================================
   顶部导航（吸顶）
   ============================================================ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);                 /* 毛玻璃效果 */
  transition: box-shadow 0.3s ease, background 0.3s ease;
}
/* 滚动后由 JS 添加该类：加深阴影，突出层次 */
.navbar.scrolled { box-shadow: 0 4px 20px rgba(15, 40, 80, 0.1); background: rgba(255,255,255,0.96); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; }
.logo-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--gradient); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; box-shadow: 0 4px 12px rgba(22,99,215,.35);
}
.logo-text i { font-style: normal; font-size: 13px; color: var(--text-sub); font-weight: 400; margin-left: 4px; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-link { font-size: 15px; color: var(--text-main); position: relative; padding: 6px 2px; transition: color .25s; }
/* 下划线动效 */
.nav-link::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 2px; border-radius: 2px;
  background: var(--gradient); transition: width .3s ease;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link.active { color: var(--primary); font-weight: 600; }
.nav-cta {
  background: var(--gradient); color: #fff !important;
  padding: 9px 20px; border-radius: 999px; font-size: 14px;
  box-shadow: 0 6px 16px rgba(22,99,215,.3);
  transition: transform .25s, box-shadow .25s;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(22,99,215,.4); }
/* 汉堡按钮：默认隐藏，移动端显示 */
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 24px; height: 2.5px; border-radius: 2px; background: var(--text-main); transition: transform .3s, opacity .3s; }
/* 汉堡按钮展开时变叉号 */
.nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ============================================================
   首屏 Banner（渐变背景 + 装饰光斑 + 网格纹理）
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;                           /* 占满首屏 */
  display: flex; align-items: center;
  padding: calc(var(--nav-height) + 40px) 0 70px;
  background: linear-gradient(140deg, #062a5e 0%, #0a4bb5 45%, #0891b2 100%);
  color: #fff;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
/* 漂浮光斑：模糊圆形，营造科技氛围 */
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .45; }
.blob-1 { width: 480px; height: 480px; background: #22d3ee; top: -120px; right: -100px; animation: float 9s ease-in-out infinite; }
.blob-2 { width: 380px; height: 380px; background: #3b82f6; bottom: -140px; left: -80px; animation: float 11s ease-in-out infinite reverse; }
/* 半透明网格纹理 */
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, black 35%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 35%, transparent 75%);
}
@keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-28px) } }  /* 光斑漂浮动画 */
.hero-content { position: relative; text-align: center; }
.hero-badge {
  display: inline-block; padding: 7px 18px; border-radius: 999px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28);
  font-size: 14px; letter-spacing: 2px; margin-bottom: 26px;
  backdrop-filter: blur(6px);
}
.hero-title { font-size: clamp(34px, 5.2vw, 58px); line-height: 1.28; font-weight: 800; letter-spacing: 1px; }
.gradient-text {
  background: linear-gradient(90deg, #7ef0f0 0%, #a7c7ff 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-sub { margin: 24px 0 36px; font-size: clamp(15px, 1.6vw, 18px); color: rgba(255,255,255,.85); }
.hero-actions { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
/* 通用按钮 */
.btn {
  display: inline-block; padding: 13px 34px; border-radius: 999px;
  font-size: 16px; cursor: pointer; border: 0; font-weight: 600;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
.btn-primary { background: #fff; color: var(--primary); box-shadow: 0 10px 26px rgba(0,0,0,.22); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(0,0,0,.3); }
/* 深色背景上的描边按钮 */
.hero .btn-primary { background: #fff; }
.btn-ghost { background: rgba(255,255,255,.1); color: #fff; border: 1.5px solid rgba(255,255,255,.6); }
.btn-ghost:hover { background: rgba(255,255,255,.22); transform: translateY(-3px); }
/* 浅色背景上的实心主按钮 */
.section .btn-primary { background: var(--gradient); color: #fff; box-shadow: 0 8px 20px rgba(22,99,215,.35); }
.btn-block { width: 100%; }
/* 首屏底部数据条 */
.hero-stats {
  display: flex; justify-content: center; gap: clamp(24px, 6vw, 70px);
  margin-top: 64px; flex-wrap: wrap;
}
.hero-stats li { text-align: center; }
.hero-stats strong { display: block; font-size: clamp(26px, 3.2vw, 38px); font-weight: 800; }
.hero-stats span { font-size: 13px; color: rgba(255,255,255,.75); letter-spacing: 1px; }

/* ============================================================
   通用 Section 结构
   ============================================================ */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-light); }   /* 隔段换浅色背景 */
.section-head { text-align: center; margin-bottom: 56px; }
.section-tag {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 4px;
  color: var(--accent); text-transform: uppercase; margin-bottom: 10px;
}
.section-head h2 { font-size: clamp(28px, 3.4vw, 38px); font-weight: 800; }
.section-head h2::after {
  content: ""; display: block; width: 56px; height: 4px;
  border-radius: 4px; background: var(--gradient); margin: 14px auto 0;
}
.section-head p { color: var(--text-sub); margin-top: 12px; font-size: 16px; }

/* ============================================================
   关于我们
   ============================================================ */
.about-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; }
.about-text h3 { font-size: 24px; margin-bottom: 18px; }
.about-text p { color: var(--text-sub); margin-bottom: 14px; text-align: justify; }
.about-points li { position: relative; padding-left: 28px; margin-bottom: 10px; color: var(--text-main); }
/* 列表项前的对勾符号 */
.about-points li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 19px; height: 19px; border-radius: 50%;
  background: var(--gradient); color: #fff;
  font-size: 12px; display: flex; align-items: center; justify-content: center;
  margin-top: 5px;
}
.about-text .btn { margin-top: 14px; }
.about-cards { display: grid; gap: 18px; }
.about-card {
  background: var(--white); border-radius: var(--radius);
  padding: 26px 28px; box-shadow: var(--card-shadow);
  border-left: 4px solid transparent;
  transition: transform .3s ease, border-color .3s ease;
}
.about-card:hover { transform: translateX(8px); border-left-color: var(--accent); }
.about-card-icon { font-size: 30px; margin-bottom: 10px; }
.about-card h4 { font-size: 17px; margin-bottom: 6px; }
.about-card p { color: var(--text-sub); font-size: 14.5px; }

/* ============================================================
   核心业务（卡片网格：PC 三列 → 平板两列 → 手机单列）
   ============================================================ */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.service-card {
  background: var(--white); border-radius: var(--radius);
  padding: 34px 28px; box-shadow: var(--card-shadow);
  border: 1px solid rgba(22,99,215,.06);
  transition: transform .35s ease, box-shadow .35s ease;
  position: relative; overflow: hidden;
}
/* 顶部渐变细条：hover 时从左滑入 */
.service-card::before {
  content: ""; position: absolute; top: 0; left: 0; height: 4px; width: 100%;
  background: var(--gradient); transform: scaleX(0); transform-origin: left;
  transition: transform .4s ease;
}
.service-card:hover { transform: translateY(-10px); box-shadow: var(--card-shadow-hover); }
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
  width: 62px; height: 62px; border-radius: 16px; font-size: 30px;
  background: linear-gradient(135deg, #e8f1ff, #e0fbfb);
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
  transition: transform .35s ease;
}
.service-card:hover .service-icon { transform: scale(1.08) rotate(-4deg); }
.service-card h3 { font-size: 19px; margin-bottom: 10px; }
.service-card p { color: var(--text-sub); font-size: 14.5px; margin-bottom: 16px; }
.service-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.service-tags li {
  font-size: 12.5px; color: var(--primary);
  background: rgba(22,99,215,.08); border-radius: 999px; padding: 4px 12px;
}

/* ============================================================
   精选案例（占位卡片，渐变缩略图）
   ============================================================ */
.cases-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.case-card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform .35s ease, box-shadow .35s ease;
}
.case-card:hover { transform: translateY(-8px); box-shadow: var(--card-shadow-hover); }
/* 六种渐变占位图，后续可直接替换为 <img> */
.thumb-1 { background: linear-gradient(135deg, #1e3a8a, #3b82f6); }
.thumb-2 { background: linear-gradient(135deg, #0f766e, #22d3ee); }
.thumb-3 { background: linear-gradient(135deg, #4338ca, #818cf8); }
.thumb-4 { background: linear-gradient(135deg, #b45309, #fbbf24); }
.thumb-5 { background: linear-gradient(135deg, #be123c, #fb7185); }
.thumb-6 { background: linear-gradient(135deg, #166534, #4ade80); }
.case-thumb {
  height: 180px; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.55); font-size: 15px; letter-spacing: 6px;
}
.case-body { padding: 24px 24px 28px; }
.case-cat {
  font-size: 12.5px; color: var(--accent); font-weight: 700;
  background: rgba(6,194,194,.1); padding: 4px 12px; border-radius: 999px;
}
.case-body h3 { font-size: 17.5px; margin: 12px 0 8px; }
.case-body p { color: var(--text-sub); font-size: 14px; }

/* ============================================================
   联系我们（信息 + 表单双栏）
   ============================================================ */
.contact-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 44px; }
.contact-info { background: var(--white); border-radius: var(--radius); padding: 36px; box-shadow: var(--card-shadow); }
.contact-info h3 { font-size: 21px; margin-bottom: 10px; }
.contact-lead { color: var(--text-sub); font-size: 15px; margin-bottom: 22px; }
.contact-list li { display: flex; gap: 14px; margin-bottom: 20px; color: var(--text-sub); font-size: 14.5px; }
.contact-list strong { color: var(--text-main); }
.ci-icon {
  flex: none; width: 44px; height: 44px; border-radius: 12px; font-size: 20px;
  background: linear-gradient(135deg, #e8f1ff, #e0fbfb);
  display: flex; align-items: center; justify-content: center;
}
.contact-form {
  background: var(--white); border-radius: var(--radius);
  padding: 36px; box-shadow: var(--card-shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.form-group label em { color: #e11d48; font-style: normal; }
/* 输入控件统一样式；校验失败时由 JS 添加 .invalid 红框 */
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 12px 14px; font-size: 15px;
  border: 1.5px solid #dde5ef; border-radius: 10px;
  background: #fbfcfe; font-family: inherit; color: var(--text-main);
  transition: border-color .25s, box-shadow .25s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22,99,215,.14);
}
.form-group .invalid { border-color: #e11d48 !important; background: #fff5f6; }
textarea { resize: vertical; min-height: 110px; }
.form-tip { margin-top: 12px; font-size: 12.5px; color: #94a3b8; text-align: center; }
/* 提交成功提示：默认隐藏，由 JS 控制显示 */
.form-success {
  display: none; margin-top: 14px; padding: 12px 16px; border-radius: 10px;
  background: #ecfdf5; color: #047857; font-size: 14px; text-align: center;
  border: 1px solid #a7f3d0;
}
.form-success.show { display: block; animation: fadeUp .5s ease both; }

/* ============================================================
   页脚
   ============================================================ */
.footer { background: #0b1b33; color: rgba(255,255,255,.72); }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 36px; padding: 64px 0 44px;
}
.footer-logo { color: #fff; margin-bottom: 14px; }
.footer-logo .logo-text { color: #fff; }
.footer-desc { font-size: 14px; line-height: 1.8; }
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 10px; font-size: 14px; }
.footer-col ul a { transition: color .25s; }
.footer-col ul a:hover { color: #7ef0f0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0; font-size: 13px; text-align: center; }
.footer-bottom a { color: #7ef0f0; }

/* ============================================================
   返回顶部按钮
   ============================================================ */
.back-top {
  position: fixed; right: 26px; bottom: 30px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--gradient); color: #fff; font-size: 19px;
  box-shadow: 0 8px 22px rgba(22,99,215,.4);
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: opacity .35s, transform .35s, visibility .35s;
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { transform: translateY(-4px); }

/* ============================================================
   滚动淡入动画（配合 main.js 中 IntersectionObserver）
   .reveal 初始隐藏，进入视口后加 .visible 触发过渡
   ============================================================ */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* 尊重系统"减少动态效果"偏好（无障碍） */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   响应式断点
   ============================================================ */
/* 平板：<= 992px */
@media (max-width: 992px) {
  .section { padding: 72px 0; }
  .services-grid, .cases-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 34px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; padding: 48px 0 32px; }
}

/* 手机：<= 768px */
@media (max-width: 768px) {
  .br-pc { display: none; }                     /* 手机端隐藏换行符，长句自动折行 */
  /* 导航折叠为抽屉式菜单 */
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; top: var(--nav-height); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: #fff; padding: 14px 6% 20px;
    box-shadow: 0 14px 30px rgba(15,40,80,.12);
    /* 默认收起：用 transform 而非 display，保证过渡动画 */
    transform: translateY(-130%); opacity: 0; visibility: hidden;
    transition: transform .35s ease, opacity .35s ease, visibility .35s ease;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav-link { padding: 12px 4px; font-size: 16px; }
  .nav-link::after { display: none; }
  .nav-cta { text-align: center; margin-top: 8px; }
  .hero { min-height: auto; padding-bottom: 56px; }
  .hero-stats { gap: 22px 34px; margin-top: 44px; }
  .services-grid, .cases-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .back-top { right: 16px; bottom: 20px; }
}
