/* =========================================================
   鹧鸪天维修 · index.css
   首页全部板块样式 + 阿叽动效 keyframes + 响应式三断点 + 无障碍增强
   依赖 base.css 的 tokens 与通用组件
   ========================================================= */

/* ---------- 6. 吉祥物动效 ---------- */
@keyframes floatY { from { transform: translateY(0); } to { transform: translateY(-10px); } }
@keyframes sway   { from { transform: rotate(-2deg); } to { transform: rotate(2deg); } }
@keyframes waveMove { from { background-position-x: 0; } to { background-position-x: 200px; } }

.float { animation: floatY 3s ease-in-out infinite alternate; }
.mascot-main { animation: floatY 3s ease-in-out infinite alternate, sway 6s ease-in-out infinite alternate; transform-origin: 50% 90%; }

/* 脚下长江水波（左/右贴边，避免移动端横向溢出） */
.wave {
  position: absolute; left: 0; right: 0; bottom: -2px; height: 46px; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='46' viewBox='0 0 200 46'%3E%3Cpath d='M0 23 Q 25 4 50 23 T 100 23 T 150 23 T 200 23 V46 H0 Z' fill='%231a5f7a' fill-opacity='0.18'/%3E%3Cpath d='M0 30 Q 25 14 50 30 T 100 30 T 150 30 T 200 30 V46 H0 Z' fill='%23e07b39' fill-opacity='0.12'/%3E%3C/svg%3E");
  background-repeat: repeat-x; background-size: 200px 46px;
  animation: waveMove 6s linear infinite;
}
.mascot-figure { position: relative; display: inline-block; max-width: 100%; overflow: hidden; border-radius: var(--r-hero); vertical-align: top; }

/* ---------- 导航 Nav（§5.7 桌面毛玻璃 + 移动抽屉）---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h); z-index: 1000;
  background: rgba(250,248,245,0.85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--neutral-200);
}
.nav .container { display: flex; align-items: center; gap: 24px; height: 100%; }
.nav-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; color: var(--neutral-900); margin-right: auto; }
.nav-brand img { width: 32px; height: 32px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 15px; font-weight: 500; color: var(--neutral-700); padding: 6px 0; position: relative; }
.nav-links a:hover { color: var(--primary); }
.nav-links a.active { color: var(--primary); }
.nav-links a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--primary); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.user-chip { font-size: 15px; font-weight: 600; color: var(--neutral-800); }

/* 汉堡（移动端显示） */
.hamburger { display: none; width: 44px; height: 44px; border: none; background: transparent; cursor: pointer; padding: 10px; }
.hamburger span { display: block; height: 2px; background: var(--neutral-800); margin: 5px 0; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }

/* 抽屉 + 遮罩 */
.nav-overlay { position: fixed; inset: 0; background: rgba(28,25,22,0.4); z-index: 1050; opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease; }
.nav-overlay.open { opacity: 1; visibility: visible; }
.nav-drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: 80%; max-width: 320px; z-index: 1100;
  background: var(--neutral-50); box-shadow: -8px 0 24px rgba(0,0,0,0.12);
  transform: translateX(100%); transition: transform .3s ease;
  padding: 24px; display: flex; flex-direction: column; gap: 4px;
  visibility: hidden;
}
.nav-drawer.open { transform: translateX(0); visibility: visible; }
.nav-drawer a.drawer-link { font-size: 18px; font-weight: 600; color: var(--neutral-800); padding: 14px 4px; border-bottom: 1px solid var(--neutral-200); }
.nav-drawer .btn { margin-top: 16px; }

/* 移动端常驻 CTA 条 */
.mobile-cta {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 900;
  background: var(--neutral-50); border-top: 1px solid var(--neutral-200);
  padding: 10px 16px; box-shadow: 0 -4px 16px rgba(0,0,0,0.06);
}
.mobile-cta .btn { width: 100%; }

/* ---------- Hero（§2 首屏）---------- */
.hero { padding-top: calc(var(--nav-h) + 64px); padding-bottom: 64px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero-visual-slogan { font-family: var(--font-display); font-size: 40px; line-height: 1.2; color: var(--neutral-900); font-weight: 700; margin: 8px 0 16px; }
.hero-sub { font-size: 18px; line-height: 1.75; color: var(--neutral-600); max-width: 560px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin: 24px 0; }
.trust-row { display: flex; flex-direction: column; gap: 8px; margin-top: 24px; }
.trust-row .item { display: flex; align-items: flex-start; gap: 8px; font-size: 15px; color: var(--neutral-600); }
.trust-row .item::before { content: "✓"; color: var(--bamboo); font-weight: 700; flex: none; }
.hero-mascot { position: relative; text-align: center; }
.hero-mascot img { width: 400px; max-width: 100%; height: auto; }
.hero .mascot-bubble { margin-top: 24px; }

/* ---------- 品牌故事 ---------- */
#story .prose p { margin-bottom: 16px; }
#story .prose p:last-child { margin-bottom: 0; }

/* ---------- 服务板块（§4 三卡）---------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card .icon-chip { width: 64px; height: 64px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.icon-blue { background: var(--primary-50); }
.icon-green { background: var(--bamboo-50); }
.icon-orange { background: var(--accent-50); }
.icon-chip svg { width: 34px; height: 34px; }
.service-card h4 { margin-bottom: 8px; }
.service-card p { font-size: 15px; color: var(--neutral-600); margin-bottom: 16px; }

/* ---------- 工程师团队（§4 四卡）---------- */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.engineer-card { text-align: center; }
.engineer-avatar { width: 120px; height: 120px; border-radius: 50%; margin: 0 auto 16px; overflow: hidden; background: var(--neutral-100); display: flex; align-items: center; justify-content: center; }
.engineer-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ring-laojun { box-shadow: 0 0 0 4px var(--accent); }
.ring-zhuying { box-shadow: 0 0 0 4px var(--bamboo); }
.ring-sanjiang { box-shadow: 0 0 0 4px var(--primary); }
.ring-cuiping { box-shadow: 0 0 0 4px var(--bamboo-700); }
.engineer-card h3 { font-size: 20px; margin-bottom: 4px; }
.eng-role { font-size: 14px; font-weight: 600; color: var(--primary); margin-bottom: 12px; }
.eng-quote { font-size: 15px; color: var(--neutral-600); font-style: italic; margin-top: 12px; }

/* ---------- 智能运维平台（§4 四创新点）---------- */
.platform-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.innovation-card .badge-num { width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 12px; }
.innovation-card h3 { font-size: 19px; margin-bottom: 8px; }
.innovation-card p { font-size: 14px; color: var(--neutral-600); }

/* ---------- 宜宾栏块（§4 三小类，插画化禁真实照片）---------- */
.yibin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.yibin-card .illu { height: 160px; border-radius: 12px; margin-bottom: 16px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.illu-scene { background: linear-gradient(135deg, #3f7d4f 0%, #1a5f7a 100%); }
.illu-culture { background: linear-gradient(135deg, #e9f2ea 0%, #cfe3ec 100%); }
.illu-food { background: linear-gradient(135deg, #fdf1dc 0%, #e07b39 100%); }
.illu svg { width: 72px; height: 72px; opacity: .85; }
.yibin-card h4 { margin-bottom: 8px; }
.yibin-card p { font-size: 14px; color: var(--neutral-600); }

/* ---------- FAQ 手风琴（§5.6 允许多开，首项展开）---------- */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--neutral-200); }
.faq-q {
  width: 100%; display: flex; align-items: center; gap: 16px; text-align: left;
  background: transparent; border: none; padding: 16px 0; cursor: pointer;
  font-size: 17px; font-weight: 600; color: var(--neutral-800); font-family: inherit;
}
.faq-q .faq-icon { width: 48px; height: 48px; flex: none; border-radius: 50%; }
.faq-q .chevron { margin-left: auto; flex: none; transition: transform .3s ease; }
.faq-q[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.faq-a-inner { padding-bottom: 16px; font-size: 15px; line-height: 1.7; color: var(--neutral-600); padding-left: 64px; }

/* ---------- 报修 CTA（§5.5）---------- */
.cta-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: start; }
.cta-mascot { position: relative; text-align: center; }
.cta-mascot img { width: 360px; max-width: 100%; height: auto; }
.cta-mascot h2 { margin: 16px 0 8px; }
.cta-mascot .lead { text-align: center; }
.cta-phone { margin-top: 16px; font-size: 15px; color: var(--neutral-600); }
.cta-phone a { font-weight: 700; }
.cta-form { background: #fff; border: 1px solid var(--neutral-200); border-radius: var(--r-card); padding: 32px; box-shadow: var(--shadow-card); }
.cta-secondary { margin-top: 16px; }

/* ---------- 页脚（§5.8 深蓝四栏）---------- */
.footer { background: var(--footer-bg); color: var(--neutral-50); padding: 64px 0 32px; }
.footer a { color: var(--primary-100); text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.footer .brand-logo { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; }
.footer .brand-logo img { width: 32px; height: 32px; }
.footer-slogan { margin-top: 12px; font-family: var(--font-display); color: var(--primary-100); }
.footer-h { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.footer p { font-size: 14px; line-height: 1.7; margin-bottom: 6px; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { font-size: 14px; }
.footer-note { font-size: 12px; color: var(--neutral-400); }
.footer-copy { font-size: 12px; color: var(--neutral-400); margin-top: 8px; }

/* =========================================================
   响应式三断点（§7）
   ========================================================= */

/* 平板 640–1023：部分网格 2 列，页脚 2 栏 */
@media (max-width: 1023px) {
  .section { padding-top: 72px; padding-bottom: 72px; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .platform-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .hero-grid { gap: 32px; }
  .hero-mascot img { width: 320px; }
  .cta-grid { gap: 32px; }
  /* 平板：压缩导航，避免横向溢出 */
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 14px; }
  .nav-actions > .btn-accent { display: none; }
}

/* 手机 <640：全部单列堆叠、导航变抽屉、常驻 CTA 条 */
@media (max-width: 639px) {
  .container { padding-left: 20px; padding-right: 20px; }
  .section { padding-top: 56px; padding-bottom: 56px; }

  /* 标题阶梯移动端 */
  h1 { font-size: 30px; line-height: 1.2; }
  h2 { font-size: 26px; line-height: 1.25; }
  h3 { font-size: 20px; line-height: 1.35; }
  h4 { font-size: 18px; line-height: 1.45; }
  .hero-visual-slogan { font-size: 30px; }
  .lead { font-size: 17px; }
  .section-closing { font-size: 22px; }

  /* 导航：隐藏内联链接与右侧按钮，显示汉堡 */
  .nav-links, .nav-actions { display: none; }
  .hamburger { display: block; }

  /* 网格全部单列 */
  .services-grid,
  .team-grid,
  .platform-grid,
  .yibin-grid { grid-template-columns: 1fr; }

  /* Hero / CTA 改为上图下文 */
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-mascot { order: -1; }
  .hero-mascot img { width: 280px; }
  .cta-grid { grid-template-columns: 1fr; gap: 24px; }
  .cta-mascot { order: -1; }
  .cta-mascot img { width: 240px; }

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

  /* 移动端常驻 CTA 条 + 给 body 预留安全距 */
  .mobile-cta { display: block; }
  body { padding-bottom: 64px; }

  .faq-a-inner { padding-left: 0; }
  .cta-form { padding: 24px 20px; }
}

/* 桌面及以上隐藏抽屉与常驻条 */
@media (min-width: 640px) {
  .nav-overlay, .nav-drawer, .mobile-cta { display: none; }
}
