/* ===== CSS RESET & VARIABLES ===== */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}

:root {
  --font-size: 16px;
  --background: #ffffff;
  --foreground: #0a0a0f;
  --card: #ffffff;
  --card-foreground: #0a0a0f;
  --popover: #ffffff;
  --popover-foreground: #0a0a0f;
  --primary: #030213;
  --primary-foreground: #ffffff;
  --secondary: #f1f1f4;
  --secondary-foreground: #030213;
  --muted: #ececf0;
  --muted-foreground: #717182;
  --accent: #e9ebef;
  --accent-foreground: #030213;
  --destructive: #d4183d;
  --destructive-foreground: #ffffff;
  --border: rgba(0,0,0,0.1);
  --input: transparent;
  --input-background: #f3f3f5;
  --switch-background: #cbced4;
  --ring: rgba(0,0,0,0.3);
  --radius: 0.625rem;
  --sidebar: #fafafa;
  --sidebar-foreground: #0a0a0f;
  --sidebar-primary: #030213;
  --sidebar-primary-foreground: #fafafa;
  --sidebar-accent: #f5f5f5;
  --sidebar-accent-foreground: #1a1a1f;
  --sidebar-border: #e5e5e5;
  --sidebar-ring: rgba(0,0,0,0.3);
  --color-green: #4ade80;
  --color-cyan: #22d3ee;
  --color-purple: #a78bfa;
  --color-orange: #fb923c;
  --color-pink: #f472b6;
  --color-destructive: #d4183d;
  --max-width: 1280px;
}

/* ===== BASE ===== */
body {
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
  font-size: var(--font-size);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  overflow-x: hidden;
}
.font-mono { font-family: 'SF Mono', 'Cascadia Code', 'Consolas', 'Monaco', monospace; }
.font-condensed { font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
ul { list-style: none; }

/* ===== UTILITY CLASSES ===== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ===== NAVIGATION ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: all 0.3s ease;
}
.nav.scrolled { background: rgba(255,255,255,0.95); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-logo { width: 32px; height: 32px; background: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-logo svg { color: var(--primary-foreground); width: 16px; height: 16px; }
.nav-title { font-size: 14px; font-weight: 700; line-height: 1.2; }
.nav-subtitle { font-size: 10px; color: var(--muted-foreground); font-family: 'SF Mono', 'Cascadia Code', 'Consolas', 'Monaco', monospace; letter-spacing: 0.05em; }
.nav-links { display: none; align-items: center; gap: 32px; }
.nav-link { font-size: 14px; color: var(--muted-foreground); transition: color 0.2s; background: none; border: none; font-family: inherit; }
.nav-link:hover { color: var(--primary); }
.nav-actions { display: none; align-items: center; gap: 16px; }
.btn-outline { font-size: 14px; color: var(--primary); border: 1px solid rgba(3,2,19,0.4); padding: 6px 16px; transition: background 0.2s; font-family: inherit; background: transparent; }
.btn-outline:hover { background: rgba(3,2,19,0.1); }
.btn-primary { font-size: 14px; background: var(--primary); color: var(--primary-foreground); padding: 6px 16px; font-weight: 500; transition: opacity 0.2s; font-family: inherit; border: none; }
.btn-primary:hover { opacity: 0.8; }
.nav-menu-btn { display: block; color: var(--foreground); }
.nav-mobile { display: none; background: rgba(255,255,255,0.98); border-bottom: 1px solid var(--border); padding: 0 24px 24px; flex-direction: column; gap: 16px; }
.nav-mobile.open { display: flex; }

/* ===== HERO ===== */
.hero { position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; padding-top: 64px; }
.hero-bg-img { position: absolute; inset: 0; z-index: 0; }
.hero-bg-img img { width: 100%; height: 100%; object-fit: cover; opacity: 0.2; }
.hero-bg-gradient { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(255,255,255,0.6), rgba(255,255,255,0.8), rgba(255,255,255,1)); z-index: 1; }
.hero-grid { position: absolute; inset: 0; z-index: 0; opacity: 0.04; background-image: linear-gradient(#4ade80 1px, transparent 1px), linear-gradient(90deg, #4ade80 1px, transparent 1px); background-size: 80px 80px; }
.hero-content { position: relative; z-index: 10; max-width: var(--max-width); margin: 0 auto; padding: 96px 24px 48px; width: 100%; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.hero h1 { font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 900; line-height: 1.1; margin-bottom: 24px; }
.hero h1 span { color: var(--primary); }
.hero-desc { font-size: 1.125rem; color: var(--muted-foreground); max-width: 640px; margin-bottom: 40px; line-height: 1.7; }
.hero-desc em { color: var(--primary); font-style: normal; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 16px; }
.btn-primary-lg { display: inline-flex; align-items: center; gap: 8px; background: var(--primary); color: var(--primary-foreground); padding: 12px 24px; font-weight: 500; font-size: 15px; font-family: inherit; border: none; transition: opacity 0.2s; }
.btn-primary-lg:hover { opacity: 0.8; }
.btn-outline-lg { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); color: var(--foreground); padding: 12px 24px; font-size: 15px; font-family: inherit; background: transparent; transition: all 0.2s; }
.btn-outline-lg:hover { border-color: var(--primary); color: var(--primary); }

/* ===== STATS BAR ===== */
.stats-wrap { position: relative; z-index: 10; max-width: var(--max-width); margin: 0 auto; padding: 0 24px 48px; width: 100%; }
.stats-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1px; background: var(--border); }
.stat-card { background: rgba(255,255,255,0.6); backdrop-filter: blur(8px); padding: 24px 16px; text-align: center; }
.stat-value { font-size: 2rem; font-weight: 800; color: var(--primary); margin-bottom: 4px; font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif; }
.stat-label { font-size: 14px; font-weight: 500; color: var(--foreground); }
.stat-sub { font-size: 12px; color: var(--muted-foreground); margin-top: 2px; }

/* ===== SENSOR TICKER ===== */
.sensor-ticker { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 12px 0; background: rgba(236,236,240,0.3); backdrop-filter: blur(4px); overflow: hidden; position: relative; z-index: 10; }
.sensor-track { display: flex; gap: 48px; animation: marquee 30s linear infinite; white-space: nowrap; width: max-content; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.sensor-item { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-family: 'SF Mono', 'Cascadia Code', 'Consolas', 'Monaco', monospace; }
.sensor-item .sensor-label { color: var(--muted-foreground); }
.sensor-item .sensor-value { font-weight: 500; }

/* ===== SECTION COMMON ===== */
.section { padding: 96px 24px; }
.section-alt { background: rgba(241,241,244,0.5); }
.section-header { text-align: center; margin-bottom: 64px; }
.section-title { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 700; color: var(--foreground); margin-bottom: 16px; line-height: 1.3; font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif; }
.section-desc { color: var(--muted-foreground); max-width: 640px; margin: 0 auto; font-size: 1rem; line-height: 1.6; }

/* ===== PAIN POINTS GRID ===== */
.pain-grid { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--border); }
.pain-card { background: var(--card); padding: 32px; transition: background 0.3s; }
.pain-card:hover { background: var(--secondary); }
.pain-icon { width: 40px; height: 40px; border: 1px solid rgba(212,24,61,0.4); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; transition: border-color 0.3s; }
.pain-card:hover .pain-icon { border-color: var(--destructive); }
.pain-icon svg { color: rgba(212,24,61,0.7); width: 18px; height: 18px; transition: color 0.3s; }
.pain-card:hover .pain-icon svg { color: var(--destructive); }
.pain-num { font-size: 12px; font-family: 'SF Mono', 'Cascadia Code', 'Consolas', 'Monaco', monospace; color: var(--muted-foreground); margin-bottom: 8px; }
.pain-title { font-size: 1rem; font-weight: 700; color: var(--foreground); margin-bottom: 12px; }
.pain-desc { font-size: 14px; color: var(--muted-foreground); line-height: 1.6; }

/* ===== ARCHITECTURE ===== */
.arch-layers { display: flex; flex-direction: column; gap: 1px; }
.arch-layer { display: flex; flex-direction: column; background: var(--card); }
.arch-layer-head { flex: none; padding: 24px; border-bottom: 1px solid var(--border); display: flex; gap: 16px; align-items: flex-start; }
.arch-layer-num { font-size: 1.5rem; font-weight: 800; font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif; line-height: 1; }
.arch-layer-title-wrap { flex: 1; }
.arch-layer-title { font-size: 1rem; font-weight: 700; color: var(--foreground); }
.arch-layer-sub { font-size: 12px; color: var(--muted-foreground); margin-top: 2px; }
.arch-layer-body { flex: 1; padding: 24px; }
.arch-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.arch-tag { font-size: 12px; padding: 6px 12px; border: 1px solid; font-family: 'SF Mono', 'Cascadia Code', 'Consolas', 'Monaco', monospace; border-radius: 2px; }

/* ===== TECH GRID ===== */
.tech-grid { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--border); }
.tech-card { background: var(--card); padding: 32px; transition: background 0.3s; }
.tech-card:hover { background: rgba(241,241,244,0.7); }
.tech-icon { width: 40px; height: 40px; border: 1px solid rgba(3,2,19,0.3); display: flex; align-items: center; justify-content: center; margin-bottom: 20px; transition: all 0.3s; }
.tech-card:hover .tech-icon { border-color: var(--primary); background: rgba(3,2,19,0.1); }
.tech-icon svg { color: rgba(3,2,19,0.6); width: 18px; height: 18px; transition: color 0.3s; }
.tech-card:hover .tech-icon svg { color: var(--primary); }
.tech-title { font-size: 1rem; font-weight: 700; color: var(--foreground); margin-bottom: 12px; }
.tech-desc { font-size: 14px; color: var(--muted-foreground); line-height: 1.6; }

/* ===== MODULES GRID ===== */
.module-grid { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--border); }
.module-card { background: var(--card); padding: 32px; transition: background 0.3s; }
.module-card:hover { background: var(--secondary); }
.module-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.module-icon { width: 40px; height: 40px; border: 1px solid rgba(3,2,19,0.3); display: flex; align-items: center; justify-content: center; transition: all 0.3s; }
.module-card:hover .module-icon { border-color: var(--primary); background: rgba(3,2,19,0.1); }
.module-icon svg { color: rgba(3,2,19,0.6); width: 18px; height: 18px; transition: color 0.3s; }
.module-card:hover .module-icon svg { color: var(--primary); }
.module-num { font-size: 12px; font-family: 'SF Mono', 'Cascadia Code', 'Consolas', 'Monaco', monospace; color: var(--muted-foreground); }
.module-title { font-size: 1rem; font-weight: 700; color: var(--foreground); margin-bottom: 12px; }
.module-desc { font-size: 14px; color: var(--muted-foreground); line-height: 1.6; margin-bottom: 16px; }
.module-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.module-tag { font-size: 12px; padding: 2px 8px; border: 1px solid rgba(3,2,19,0.2); color: rgba(3,2,19,0.7); font-family: 'SF Mono', 'Cascadia Code', 'Consolas', 'Monaco', monospace; }

/* ===== SCENARIOS ===== */
.scenario-tabs { display: flex; flex-wrap: wrap; gap: 1px; margin-bottom: 1px; background: var(--border); }
.scenario-tab { flex: 1; min-width: 120px; padding: 12px 16px; font-size: 14px; font-weight: 500; font-family: inherit; border: none; background: var(--card); color: var(--muted-foreground); transition: all 0.2s; cursor: pointer; }
.scenario-tab:hover { color: var(--foreground); background: var(--secondary); }
.scenario-tab.active { background: var(--primary); color: var(--primary-foreground); }
.scenario-panel { display: grid; grid-template-columns: 1fr; background: var(--card); }
.scenario-image-wrap { position: relative; overflow: hidden; min-height: 280px; }
.scenario-image-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.5s; }
.scenario-overlay { position: absolute; inset: 0; z-index: 1; background: linear-gradient(to right, rgba(255,255,255,0.8), transparent); }
.scenario-overlay-2 { position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(255,255,255,0.6), transparent); }
.scenario-info { padding: 40px; display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 2; }
.scenario-id { font-size: 12px; font-family: 'SF Mono', 'Cascadia Code', 'Consolas', 'Monaco', monospace; color: var(--primary); margin-bottom: 12px; letter-spacing: 0.1em; }
.scenario-title { font-size: 1.25rem; font-weight: 700; color: var(--foreground); margin-bottom: 16px; }
.scenario-desc { font-size: 14px; color: var(--muted-foreground); line-height: 1.6; margin-bottom: 24px; }
.scenario-points { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.scenario-point { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; }
.scenario-point svg { color: var(--primary); flex: none; margin-top: 2px; width: 14px; height: 14px; }
.scenario-point span { color: rgba(10,10,15,0.8); }
.scenario-benefit { border-left: 2px solid var(--primary); padding-left: 16px; font-size: 14px; color: var(--muted-foreground); font-style: italic; }

/* ===== OPS ===== */
.ops-grid { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--border); }
.ops-card { background: var(--card); padding: 32px; }
.ops-icon { width: 48px; height: 48px; border: 1px solid rgba(3,2,19,0.4); display: flex; align-items: center; justify-content: center; margin-bottom: 24px; }
.ops-icon svg { color: var(--primary); width: 20px; height: 20px; }
.ops-title { font-size: 1.125rem; font-weight: 700; color: var(--foreground); margin-bottom: 16px; }
.ops-desc { font-size: 14px; color: var(--muted-foreground); line-height: 1.6; margin-bottom: 24px; }
.ops-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.ops-tag { font-size: 12px; padding: 4px 8px; border: 1px solid rgba(3,2,19,0.2); color: var(--primary); font-family: 'SF Mono', 'Cascadia Code', 'Consolas', 'Monaco', monospace; }

/* ===== CTA ===== */
.cta { position: relative; overflow: hidden; }
.cta-grid-bg { position: absolute; inset: 0; opacity: 0.03; background-image: linear-gradient(#4ade80 1px, transparent 1px), linear-gradient(90deg, #4ade80 1px, transparent 1px); background-size: 40px 40px; }
.cta-inner { position: relative; max-width: 800px; margin: 0 auto; text-align: center; }
.cta-title { font-size: clamp(1.75rem, 4vw, 3rem); font-weight: 700; color: var(--foreground); margin-bottom: 24px; line-height: 1.3; }
.cta-title span { color: var(--primary); }
.cta-desc { color: var(--muted-foreground); margin-bottom: 40px; max-width: 560px; margin-left: auto; margin-right: auto; line-height: 1.6; }
.cta-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.btn-primary-xl { display: inline-flex; align-items: center; gap: 8px; background: var(--primary); color: var(--primary-foreground); padding: 14px 32px; font-weight: 500; font-size: 1rem; font-family: inherit; border: none; transition: opacity 0.2s; }
.btn-primary-xl:hover { opacity: 0.8; }
.btn-outline-xl { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); color: var(--foreground); padding: 14px 32px; font-size: 1rem; font-family: inherit; background: transparent; transition: all 0.2s; }
.btn-outline-xl:hover { border-color: var(--primary); color: var(--primary); }

/* ===== FOOTER ===== */
.footer { border-top: 1px solid var(--border); background: var(--card); padding: 48px 24px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 40px; margin-bottom: 48px; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-logo { width: 32px; height: 32px; background: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.footer-logo svg { color: var(--primary-foreground); width: 16px; height: 16px; }
.footer-company { font-weight: 700; color: var(--foreground); }
.footer-company-en { font-size: 10px; color: var(--muted-foreground); font-family: 'SF Mono', 'Cascadia Code', 'Consolas', 'Monaco', monospace; margin-top: 2px; }
.footer-about { font-size: 14px; color: var(--muted-foreground); line-height: 1.6; max-width: 360px; }
.footer-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.footer-badge { font-size: 12px; border: 1px solid var(--border); padding: 2px 8px; color: var(--muted-foreground); font-family: 'SF Mono', 'Cascadia Code', 'Consolas', 'Monaco', monospace; }
.footer-col-title { font-size: 12px; font-family: 'SF Mono', 'Cascadia Code', 'Consolas', 'Monaco', monospace; color: var(--primary); letter-spacing: 0.1em; margin-bottom: 16px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-link { font-size: 14px; color: var(--muted-foreground); background: none; border: none; font-family: inherit; text-align: left; padding: 0; transition: color 0.2s; cursor: pointer; }
.footer-link:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; display: flex; flex-direction: column; gap: 16px; font-size: 12px; color: var(--muted-foreground); font-family: 'SF Mono', 'Cascadia Code', 'Consolas', 'Monaco', monospace; }

/* ===== ANIMATIONS ===== */
.fade-up { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-left { opacity: 0; transform: translateX(-24px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade-left.visible { opacity: 1; transform: translateX(0); }
.scale-in { opacity: 0; transform: scale(0.95); transition: opacity 0.5s ease, transform 0.5s ease; }
.scale-in.visible { opacity: 1; transform: scale(1); }

/* ===== RESPONSIVE ===== */
@media (min-width: 640px) {
  .stats-grid { grid-template-columns: repeat(4,1fr); }
  .stat-card { padding: 24px; }
  .stat-value { font-size: 2.25rem; }
}
@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-actions { display: flex; }
  .nav-menu-btn { display: none; }
  .pain-grid { grid-template-columns: repeat(2,1fr); }
  .tech-grid { grid-template-columns: repeat(2,1fr); }
  .arch-layer { flex-direction: row; }
  .arch-layer-head { width: 192px; flex-direction: column; border-bottom: none; border-right: 1px solid var(--border); gap: 8px; }
  .scenario-panel { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}
@media (min-width: 1024px) {
  .pain-grid { grid-template-columns: repeat(3,1fr); }
  .tech-grid { grid-template-columns: repeat(3,1fr); }
  .module-grid { grid-template-columns: repeat(3,1fr); }
  .ops-grid { grid-template-columns: repeat(3,1fr); }
  .scenario-tab { padding: 12px 20px; }
}
