/* ========================================================================
   通浩网络 tonghoo.com — Design System
   Source: ui-ux-pro-max-skill → Enterprise Gateway + Social Proof-Focused
   ======================================================================== */

@import url('./fonts.css');

/* ---------- Design Tokens ---------- */
:root {
  /* Colors */
  --color-primary: #0EA5E9;
  --color-primary-dark: #0284C7;
  --color-secondary: #38BDF8;
  --color-cta: #F97316;
  --color-cta-dark: #EA580C;
  --color-bg: #F0F9FF;
  --color-bg-alt: #FFFFFF;
  --color-text: #0C4A6E;
  --color-text-muted: #475569;
  --color-border: #E2E8F0;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 40px rgba(14, 165, 233, 0.15), 0 8px 16px rgba(14, 165, 233, 0.08);
  --shadow-glow: 0 0 30px rgba(14, 165, 233, 0.25);

  /* Transitions */
  --t-fast: 150ms ease;
  --t-base: 200ms ease;
  --t-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
}

/* ---------- Base Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---------- Layout Utilities ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (min-width: 1024px) {
  .container { padding: 0 2rem; }
}
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.w-full { width: 100%; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }
.hidden { display: none; }
@media (min-width: 768px) { .md\:flex { display: flex; } }
@media (min-width: 1024px) { .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); } .lg\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Gap & Spacing ---------- */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }

/* ---------- Text ---------- */
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-muted { color: var(--color-text-muted); }
.text-primary { color: var(--color-primary); }
.text-white { color: #fff; }

/* ---------- Grid Templates ---------- */
.grid-cols-1 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .sm\:flex { display: flex; }
}
@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
  .lg\:grid-cols-6 { grid-template-columns: repeat(6, 1fr); }
}

/* ---------- Focus States (a11y) ---------- */
*:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--t-base);
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-cta);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover {
  background: var(--color-cta-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}
.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-secondary:hover {
  background: var(--color-primary);
  color: #fff;
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-ghost:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* ---------- Navigation ---------- */
.nav-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--t-base);
}
.nav-bar.scrolled {
  box-shadow: var(--shadow-md);
}
.nav-link {
  position: relative;
  padding: 0.5rem 0.75rem;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color var(--t-base);
}
.nav-link:hover, .nav-link.active {
  color: var(--color-primary);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: all var(--t-base);
  transform: translateX(-50%);
}
.nav-link:hover::after, .nav-link.active::after {
  width: 70%;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 50%, #FFFFFF 100%);
}
.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -150px;
  left: -150px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  background: rgba(14, 165, 233, 0.1);
  color: var(--color-primary-dark);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(14, 165, 233, 0.2);
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-text);
}
.hero-title .gradient {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-title .accent {
  color: var(--color-cta);
}
.hero-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: var(--color-text-muted);
  max-width: 640px;
}

/* ---------- Stats Bar ---------- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  padding: 2rem;
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
}
@media (min-width: 768px) {
  .stats-bar { grid-template-columns: repeat(4, 1fr); }
}
.stat-item {
  text-align: center;
}
.stat-number {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-label {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* ---------- Section Base ---------- */
.section {
  padding: clamp(3rem, 8vw, 6rem) 0;
}
.section-eyebrow {
  display: inline-block;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: 1rem;
}
.section-subtitle {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 640px;
  margin: 0 auto 3rem;
}

/* ---------- Trust Badges ---------- */
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  background: rgba(14, 165, 233, 0.06);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-primary-dark);
}

/* ---------- Tabs (Industry Solutions) ---------- */
.tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.4rem;
  background: rgba(14, 165, 233, 0.06);
  border-radius: 999px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: 100%;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: all var(--t-base);
  white-space: nowrap;
  border: none;
  background: transparent;
}
.tab:hover { color: var(--color-primary); }
.tab.active {
  background: #fff;
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

/* ---------- Industry Panel ---------- */
.industry-panel {
  display: none;
  animation: fade-in 400ms ease;
}
.industry-panel.active { display: grid; }

@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Product Portal Cards ---------- */
.portal-card {
  position: relative;
  display: block;
  padding: 2rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  transition: all var(--t-slow);
  cursor: pointer;
  overflow: hidden;
}
.portal-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  opacity: 0;
  transition: opacity var(--t-slow);
  z-index: 0;
}
.portal-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}
.portal-card > * { position: relative; z-index: 1; }
.portal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: rgba(14, 165, 233, 0.1);
  color: var(--color-primary);
  margin-bottom: 1.25rem;
  transition: all var(--t-base);
}
.portal-card:hover .portal-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  transform: scale(1.05);
}
.portal-title {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--color-text);
  transition: color var(--t-base);
}
.portal-card:hover .portal-title { color: #fff; }
.portal-desc {
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
  transition: color var(--t-base);
}
.portal-card:hover .portal-desc { color: rgba(255, 255, 255, 0.9); }
.portal-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--color-primary);
  font-weight: 600;
  transition: gap var(--t-base);
}
.portal-card:hover .portal-arrow {
  color: #fff;
  gap: 0.7rem;
}

/* ---------- Capability Grid ---------- */
.cap-card {
  padding: 1.75rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all var(--t-base);
}
.cap-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.cap-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #fff;
  margin-bottom: 1rem;
}

/* ---------- Client Logos ---------- */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .logo-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .logo-grid { grid-template-columns: repeat(6, 1fr); }
}
.client-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--t-base);
}
.client-logo:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-2px);
}

/* ---------- Contact Form ---------- */
.form-card {
  background: #fff;
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid var(--color-border);
}
.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-bg);
  transition: all var(--t-base);
}
.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}
.form-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}

/* ---------- Footer ---------- */
.footer {
  background: linear-gradient(180deg, #0C4A6E 0%, #082F49 100%);
  color: rgba(255, 255, 255, 0.85);
}
.footer-link {
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--t-base);
  cursor: pointer;
}
.footer-link:hover {
  color: #fff;
}

/* ---------- Scroll Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Mobile Menu ---------- */
.mobile-toggle {
  display: none;
  cursor: pointer;
  padding: 0.5rem;
  border: none;
  background: transparent;
  color: var(--color-text);
}
.nav-cta { display: none; }
.nav-cta-mobile { display: none; }
@media (min-width: 768px) {
  .mobile-toggle { display: none; }
  .nav-cta { display: flex; }
}
@media (max-width: 767px) {
  .mobile-toggle { display: flex; }
  .nav-links {
    position: fixed;
    inset: 64px 0 0 0;
    background: #fff;
    flex-direction: column;
    padding: 2rem;
    gap: 1rem;
    transform: translateX(100%);
    transition: transform var(--t-slow);
    z-index: 40;
    border-top: 1px solid var(--color-border);
    overflow-y: auto;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links.open .nav-link {
    font-size: 1.125rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
  }
  .nav-link::after { display: none; }
  .nav-links.open .nav-cta-mobile {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
  }
}
