/* ============================================================
   ThreeWay Design System · Base CSS
   - Modern Reset, Box-Sizing & Touch Target Baseline
   - WCAG Accessibility: Focus-Visible, Reduced-Motion
   - Floating CTA, Sticky Mobile Bar & Modal Primitives
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  color: var(--ink, #0F172A);
  background-color: var(--surface-soft, #F8FAFC);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ------------------------------------------------------------
   WCAG 2.1 AA 级核心无障碍规范
   ------------------------------------------------------------ */

/* 1. 全局焦点环可见性 (≥2px outline with offset) */
:focus-visible {
  outline: 2px solid var(--focus, #0F766E) !important;
  outline-offset: 3px !important;
}

/* 2. 减弱动态效果 (prefers-reduced-motion) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 3. 移动端触控基线 (Minimum Touch Target: 44px) */
button, input, select, textarea, .btn, .cta-btn, .nav-link, a.btn-touch {
  min-height: var(--touch-target, 44px);
  min-width: var(--touch-target, 44px);
}

/* ------------------------------------------------------------
   通用容器与响应式网格
   ------------------------------------------------------------ */

.tw-container {
  max-width: var(--container, 1120px);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* 统一断点辅助类 */
@media (max-width: 1080px) {
  .hide-desktop { display: none !important; }
}

@media (max-width: 860px) {
  .hide-tablet { display: none !important; }
  .grid-2, .grid-3 { grid-template-columns: 1fr !important; }
}

@media (max-width: 640px) {
  .hide-mobile { display: none !important; }
  .tw-container { padding-left: 16px; padding-right: 16px; }
}

/* ------------------------------------------------------------
   浮动客服与移动端粘性 CTA (Conversion Primitives)
   ------------------------------------------------------------ */

.floating-contact-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 990;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--brand, #0F766E);
  color: #FFFFFF;
  padding: 12px 20px;
  border-radius: var(--radius-full, 9999px);
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s;
}

.floating-contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.16);
}

/* 移动端粘性底部通栏 */
.mobile-sticky-bar {
  display: none;
}

@media (max-width: 640px) {
  .mobile-sticky-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 980;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid var(--line, #E2E8F0);
    padding: 10px 16px;
    gap: 10px;
  }
  
  .mobile-sticky-bar .sticky-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand, #0F766E);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: var(--radius-m, 12px);
    text-decoration: none;
    min-height: 44px;
  }
  
  .mobile-sticky-bar .sticky-line {
    background: #06C755; /* Official LINE Green */
    color: #FFFFFF;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-m, 12px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
  }
  
  /* 给移动端底部留出粘性栏间距，防止内容被遮挡 */
  body {
    padding-bottom: 70px;
  }
}


/* ========================================================================= */
/* Universal Comprehensive Global Multi-Channel Footer Styles                */
/* ========================================================================= */
.tw-global-footer {
  background: #0B132B;
  color: #E2E8F0;
  padding: 60px 20px 30px;
  border-top: 2px solid #1E293B;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang TC", "Noto Sans TC", sans-serif;
  margin-top: 60px;
}
.tw-gf-container {
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.5fr 1.5fr;
  gap: 32px;
}
@media (max-width: 980px) {
  .tw-gf-container {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .tw-gf-container {
    grid-template-columns: 1fr;
  }
}
.tw-gf-brand {
  font-size: 1.15rem;
  color: #FFFFFF;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tw-gf-logo-dot {
  width: 10px;
  height: 10px;
  background: #0F766E;
  border-radius: 50%;
  display: inline-block;
}
.tw-gf-desc {
  font-size: 0.85rem;
  color: #94A3B8;
  line-height: 1.65;
  margin-bottom: 16px;
}
.tw-gf-hub-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tw-gf-tag {
  background: #1E293B;
  color: #CBD5E1;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid #334155;
}
.tw-gf-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #F8FAFC;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
  border-bottom: 1px solid #1E293B;
  padding-bottom: 8px;
}
.tw-gf-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tw-gf-link-btn {
  background: transparent;
  border: none;
  color: #CBD5E1;
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
  line-height: 1.5;
}
.tw-gf-link-btn:hover {
  color: #38BDF8;
}
.tw-gf-link-btn code {
  background: #1E293B;
  padding: 2px 6px;
  border-radius: 4px;
  color: #FBBF24;
  font-family: monospace;
}
.tw-gf-link {
  color: #CBD5E1;
  text-decoration: none;
  font-size: 0.85rem;
  line-height: 1.6;
  transition: color 0.15s;
}
.tw-gf-link:hover {
  color: #38BDF8;
}
.tw-gf-office {
  font-size: 0.82rem;
  color: #94A3B8;
  line-height: 1.55;
  margin-bottom: 12px;
}
.tw-gf-office strong {
  color: #E2E8F0;
}
.tw-gf-bottom {
  max-width: 1140px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid #1E293B;
}
.tw-gf-disclaimer {
  font-size: 0.78rem;
  color: #64748B;
  line-height: 1.7;
  margin-bottom: 14px;
}
.tw-gf-copyright {
  font-size: 0.8rem;
  color: #94A3B8;
  text-align: center;
}
