/* ============================================================
   Gotlink 全站响应式适配 CSS
   平板: max-width 1024px
   手机: max-width 768px
   小屏: max-width 480px
   ============================================================ */

/* ---- 全局基础样式（非媒体查询，所有尺寸生效） ---- */
/* Footer LOGO: 确保所有页面的ft-logo class图片正确显示 */
.ft-logo {
  height: 28px;
  display: block;
  filter: brightness(0) invert(1) opacity(.8);
}

/* Footer brand img (footer-brand类型页面) */
.footer-brand img {
  height: 28px;
  display: block;
  filter: brightness(0) invert(1) opacity(.8);
  margin-bottom: 16px;
}

/* ---- 平板 (≤1024px) ---- */
@media (max-width: 1024px) {
  .container { padding: 0 32px; }

  /* NAV */
  #nav { padding: 0 32px; }

  /* HERO */
  .hero-h1 { font-size: clamp(40px, 6vw, 72px); }
  .hero-stats { gap: 0; }
  .hs-item { padding: 0 24px; }

  /* SERVICES BENTO */
  .bento-grid { grid-template-columns: repeat(6, 1fr); }
  .bc:nth-child(1) { grid-column: span 6; }
  .bc:nth-child(2) { grid-column: span 3; }
  .bc:nth-child(3) { grid-column: span 3; }
  .bc:nth-child(4) { grid-column: span 3; }
  .bc:nth-child(5) { grid-column: span 3; }

  /* FEATURE SECTION */
  .feat-cnt { padding: 0 40px !important; }
  .feat-panel { width: min(520px, 50vw) !important; right: 2% !important; }

  /* PAIN POINTS */
  .pc-grid { grid-template-columns: repeat(2, 1fr); }

  /* CONTACT */
  .ct-grid { grid-template-columns: 1fr; gap: 40px; }

  /* FOOTER */
  .ft-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }

  /* INNER PAGE: page-hero */
  .page-hero { padding: 120px 32px 80px; }
  .page-h1 { font-size: clamp(36px, 5vw, 64px); }

  /* INNER PAGE: card-grid */
  .card-grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* INNER PAGE: two-col */
  .two-col { grid-template-columns: 1fr; gap: 40px; }

  /* INNER PAGE: process steps */
  .process-steps { grid-template-columns: repeat(2, 1fr); }

  /* INNER PAGE: compare table */
  .compare-table { font-size: 13px; }

  /* ABOUT page */
  .about-hero-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .service-grid { grid-template-columns: repeat(2, 1fr); }

  /* CASES page */
  .cases-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- 手机 (≤768px) ---- */
@media (max-width: 768px) {
  .container { padding: 0 20px; }
  body { cursor: auto; }
  #cur, #cur-r { display: none; }

  /* NAV */
  #nav { padding: 0 20px; height: 60px; }
  .nav-links { display: none; }
  .nav-ctas .btn-ghost { display: none; }
  .btn-red { padding: 8px 18px; font-size: 12px; }

  /* HERO */
  #hero { min-height: 100svh; }
  .scroll-ind { display: none !important; }
  .hero-eyebrow { max-width: calc(100% - 40px) !important; white-space: normal !important; text-align: center !important; }
  .hero-h1 { font-size: clamp(32px, 9vw, 56px); }
  .hero-sub { font-size: 14px; }
  .hero-acts { flex-direction: column; gap: 12px; }
  .btn-hero-p, .btn-hero-s { width: 100%; max-width: 320px; justify-content: center; }
  .hero-stats {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    opacity: 1 !important;
    transform: none !important;
    flex-wrap: wrap;
    padding: 24px 20px 32px;
    gap: 0;
    justify-content: center;
    background: rgba(245,243,239,.95);
    border-top: 1px solid rgba(0,0,0,.06);
  }
  #hero {
    display: flex;
    flex-direction: column;
    height: auto !important;
    min-height: 100svh;
    padding-bottom: 0 !important;
  }
  .hero-cnt {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 80px;
    padding-bottom: 40px;
  }
  .hs-item {
    padding: 12px 16px;
    border-right: none;
    border-bottom: 1px solid rgba(0,0,0,.06);
    width: 50%;
    box-sizing: border-box;
    text-align: center;
    overflow: hidden;
  }
  .hs-item:nth-child(odd) { border-right: 1px solid rgba(0,0,0,.06); }
  .hs-item:nth-last-child(-n+2) { border-bottom: none; }
  .hs-num { font-size: clamp(20px, 6vw, 28px) !important; }
  .hs-num em { font-size: 0.7em; }
  .hs-lbl { font-size: 11px !important; }

  /* INTRO */
  #intro { padding: 60px 0; }
  .intro-body { font-size: clamp(18px, 4.5vw, 28px); padding: 0 20px; }
  .intro-two-col { display: block !important; }
  .intro-two-col > * { margin-bottom: 40px; }
  .intro-two-col > *:last-child { margin-bottom: 0; }
  .phil-accordion { display: none; }

  /* SERVICES BENTO */
  #services { padding: 80px 0; }
  .bento-head { flex-direction: column; gap: 20px; align-items: flex-start; }
  .bento-grid { grid-template-columns: 1fr; gap: 12px; }
  .bc:nth-child(n) { grid-column: span 1; }
  .bc-h { font-size: 22px; }
  .bc-img { height: 200px; }

  /* FEATURE SECTION — 手机端完全重排为普通堆叠 */
  #features { height: auto !important; }
  .feat-sticky-wrap { height: auto !important; position: relative !important; }
  .feat-sticky-inner { position: relative !important; top: auto !important; height: auto !important; overflow: visible !important; }
  .feat-slide {
    position: relative !important;
    inset: auto !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }
  .feat-slide.fs-exit { opacity: 1 !important; }
  .feat-bg {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    min-height: 0 !important;
    transform: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    overflow: visible !important;
    padding: 24px 0 32px !important;
    background: #F5F4F0 !important;
  }
  /* 手机端隐藏 feat-bg 里的装饰性绝对定位元素（orbs/grid），只保留 feat-dashboard */
  .feat-bg > div[style*="position:absolute"]:not(.feat-dashboard),
  .feat-bg > div[style*="position: absolute"]:not(.feat-dashboard) {
    display: none !important;
  }
  /* feat-dashboard class直接定位 */
  .feat-dashboard {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    transform: none !important;
    width: calc(100% - 32px) !important;
    max-width: 400px !important;
    margin: 20px auto !important;
  }
  .feat-logo-morph { display: none !important; }
  .feat-num-bg { display: none !important; }
  .feat-badges { display: none !important; }
  .feat-ov { display: none !important; }
  .feat-cnt {
    position: relative !important;
    inset: auto !important;
    padding: 32px 20px 40px !important;
    align-items: flex-start !important;
    max-width: 100% !important;
    z-index: 2 !important;
    order: 1 !important;
  }
  .feat-cnt-inner { max-width: 100% !important; }
  .feat-h2 { font-size: clamp(28px, 7vw, 44px) !important; }
  .feat-metrics { gap: 20px !important; flex-wrap: wrap !important; }
  .feat-dots { display: none !important; }
  .feat-section { height: auto !important; }
  .feat-sticky { position: relative !important; top: auto !important; height: auto !important; }
  .feat-slides { position: relative !important; }
  .feat-panel { position: relative !important; right: auto !important; top: auto !important; transform: none !important; width: 90% !important; margin: 0 auto 40px !important; }
  .feat-ov-left { display: none !important; }

  /* PAIN POINTS */
  #pain { padding: 80px 0; }
  .pc-grid { grid-template-columns: 1fr !important; gap: 16px !important; }
  .pain-grid { grid-template-columns: 1fr !important; gap: 12px !important; }
  .pc { min-height: 180px; padding: 28px 24px !important; }
  .pc-title { font-size: 17px !important; }
  .pc-desc { font-size: 13px !important; }

  /* MARQUEE */
  .mq-track { gap: 40px; }

  /* CONTACT */
  #contact { padding: 80px 0; }
  .ct-grid { grid-template-columns: 1fr; gap: 32px; }
  .ct-h2 { font-size: clamp(28px, 7vw, 44px); }
  .f-row { grid-template-columns: 1fr; }

  /* FOOTER */
  #footer { padding: 60px 0 32px; }
  .ft-grid { grid-template-columns: 1fr; gap: 32px; }
  .ft-brand { max-width: 100%; }
  .ft-bottom { flex-direction: column; gap: 16px; text-align: center; }
  /* 内页footer（footer-inner类型）手机端单列 */
  .footer-inner { grid-template-columns: 1fr !important; gap: 32px !important; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }

  /* FLOATING BUTTONS */
  .fb-wrap { bottom: 20px; right: 16px; gap: 10px; }
  .fb { width: 44px; height: 44px; }

  /* INNER PAGE: page-hero */
  .page-hero { padding: 100px 20px 60px; }
  .page-h1 { font-size: clamp(28px, 7vw, 48px); }
  .page-hero-sub { font-size: 14px; }
  .page-stats { flex-wrap: wrap; gap: 20px; }
  .page-stat { width: 45%; }
  .breadcrumb { font-size: 11px; }
  .hero-tags { flex-wrap: wrap; }

  /* INNER PAGE: sections */
  .inner-section { padding: 60px 0; }
  .sec-h2 { font-size: clamp(24px, 6vw, 40px); }

  /* INNER PAGE: card-grid */
  .card-grid { grid-template-columns: 1fr !important; }

  /* INNER PAGE: two-col */
  .two-col { grid-template-columns: 1fr; gap: 32px; }
  .two-col-img { order: -1; }

  /* INNER PAGE: process steps */
  .process-steps { grid-template-columns: 1fr; }
  .process-steps::before { display: none; }

  /* INNER PAGE: compare table */
  .compare-table { font-size: 12px; overflow-x: auto; display: block; }

  /* INNER PAGE: pricing */
  .pricing-grid { grid-template-columns: 1fr; }

  /* INNER PAGE: FAQ */
  .faq-list { gap: 8px; }

  /* ABOUT page */
  .about-hero-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .milestones { flex-direction: column; }

  /* CASES page */
  .cases-grid { grid-template-columns: 1fr; }
  .case-filters { flex-wrap: wrap; gap: 8px; }

  /* CASE DETAIL page */
  .case-hero-grid { grid-template-columns: 1fr; }
  .case-metrics { grid-template-columns: repeat(2, 1fr); }
  .case-images { grid-template-columns: 1fr; }

  /* CONTACT page */
  .contact-grid { grid-template-columns: 1fr; }
  .contact-map { height: 250px; }
}

/* ---- 小屏手机 (≤480px) ---- */
@media (max-width: 480px) {
  .container { padding: 0 16px; }

  .hero-h1 { font-size: clamp(28px, 10vw, 44px); }
  .hs-item { width: 100%; border-right: none; border-bottom: 1px solid rgba(0,0,0,.08); padding-bottom: 12px; }

  .page-h1 { font-size: clamp(24px, 8vw, 36px); }
  .page-stat { width: 100%; }

  .case-metrics { grid-template-columns: 1fr; }

  .btn-hero-p, .btn-hero-s { font-size: 14px; padding: 14px 24px; }

  .ct-h2 { font-size: clamp(24px, 8vw, 36px); }
}

/* ---- 汉堡菜单 (手机导航) ---- */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  margin-left: 8px;
  background: transparent;
  border: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: all 0.3s;
}
.nav-mobile-menu {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: rgba(250,250,248,.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,.08);
  z-index: 999;
  padding: 16px 20px 24px;
  flex-direction: column;
  gap: 0;
  box-shadow: 0 8px 32px rgba(0,0,0,.08);
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-item {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
  font-size: 15px;
  font-weight: 500;
  color: #0D0D12;
}
.nav-mobile-item:last-child { border-bottom: none; }
.nav-mobile-sub {
  padding: 8px 0 8px 16px;
  font-size: 13px;
  color: #666;
  border-bottom: 1px solid rgba(0,0,0,.04);
  display: block;
}
.nav-mobile-sub:last-child { border-bottom: none; }
.nav-mobile-section {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #C0003C;
  padding: 16px 0 8px;
}
.nav-mobile-cta {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (max-width: 768px) {
  .nav-hamburger { display: flex; }
  .nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-hamburger.open span:nth-child(2) { opacity: 0; }
  .nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
