/* ================================================================
   Earth API 首页样式
   设计系统：明亮工作区 + 宇宙入口 hero
   ================================================================ */

:root {
  /* Backgrounds */
  --bg-page: #F8FAFC;
  --bg-page-rgb: 248, 250, 252;
  --bg-surface: #FFFFFF;
  --bg-surface-rgb: 255, 255, 255;
  --bg-elevated: #FFFFFF;
  --bg-glass: rgba(255, 255, 255, 0.72);
  --bg-glass-strong: rgba(255, 255, 255, 0.92);
  --bg-subtle: #F1F5F9;
  --bg-subtle-rgb: 241, 245, 249;

  /* Text */
  --text-primary: #0F172A;
  --text-primary-rgb: 15, 23, 42;
  --text-secondary: #475569;
  --text-secondary-rgb: 71, 85, 105;
  --text-muted: #64748B;
  --text-muted-rgb: 100, 116, 139;
  --text-placeholder: #94A3B8;
  --text-on-primary: #FFFFFF;

  /* Accent */
  --accent-primary: #0EA5E9;
  --accent-primary-rgb: 14, 165, 233;
  --accent-primary-hover: #0284C7;
  --accent-primary-subtle: rgba(14, 165, 233, 0.12);
  --accent-secondary: #F59E0B;
  --accent-secondary-rgb: 245, 158, 11;
  --accent-secondary-hover: #D97706;
  --accent-secondary-subtle: rgba(245, 158, 11, 0.12);

  /* Semantic */
  --success: #10B981;
  --success-subtle: rgba(16, 185, 129, 0.12);
  --warning: #F59E0B;
  --warning-subtle: rgba(245, 158, 11, 0.12);
  --error: #EF4444;
  --error-subtle: rgba(239, 68, 68, 0.12);

  /* Borders */
  --border-default: #E2E8F0;
  --border-strong: #CBD5E1;
  --border-subtle: #F1F5F9;

  /* Hero cosmic */
  --bg-hero: #0B1120;
  --bg-hero-rgb: 11, 17, 32;
  --text-hero: #F8FAFC;
  --text-hero-muted: #CBD5E1;
  --accent-glow: rgba(14, 165, 233, 0.45);
  --accent-glow-soft: rgba(14, 165, 233, 0.18);

  /* Typography */
  --font-brand: 'Lobster', 'Ma Shan Zheng', cursive;
  --font-display: 'Outfit', 'Noto Sans SC', sans-serif;
  --font-body: 'Outfit', 'Noto Sans SC', sans-serif;
  --font-mono: 'JetBrains Mono', 'Noto Sans SC', monospace;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(var(--text-primary-rgb), 0.04);
  --shadow-sm: 0 2px 4px rgba(var(--text-primary-rgb), 0.04), 0 1px 2px rgba(var(--text-primary-rgb), 0.06);
  --shadow-md: 0 4px 12px rgba(var(--text-primary-rgb), 0.06), 0 2px 4px rgba(var(--text-primary-rgb), 0.04);
  --shadow-lg: 0 12px 24px rgba(var(--text-primary-rgb), 0.08), 0 4px 8px rgba(var(--text-primary-rgb), 0.04);
  --shadow-xl: 0 24px 48px rgba(var(--text-primary-rgb), 0.12), 0 8px 16px rgba(var(--text-primary-rgb), 0.06);

  /* Motion */
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-section: cubic-bezier(0.65, 0, 0.35, 1);
  --transition-fast: 0.15s;
  --transition-base: 0.2s;
  --transition-slow: 0.35s;

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

html {
  scroll-behavior: auto;
}

body {
  font-family: var(--font-body);
  background: var(--bg-hero);
  color: var(--text-hero);
  overflow: hidden;
  height: 100dvh;
  width: 100vw;
  line-height: 1.7;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  padding: 0.75rem 1.25rem;
  background: var(--accent-primary);
  color: var(--text-on-primary);
  border-radius: var(--radius-lg);
  text-decoration: none;
  font-weight: 500;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* Header theme transition */
.site-header {
  transition: background-color 0.5s var(--ease-out-quart), border-color 0.5s var(--ease-out-quart);
}

/* 宇宙背景画布 */
#space-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.9s var(--ease-section);
}

/* 栏目指示器 */
.section-indicator {
  position: fixed;
  right: 2.25rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  cursor: pointer;
  transition-property: background, border-color, transform;
  transition-duration: 0.35s;
  transition-timing-function: var(--ease-out-quart);
}

.indicator-dot:hover {
  border-color: rgba(255, 255, 255, 0.55);
  transform: scale(1.2);
}

.indicator-dot.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  box-shadow: 0 0 14px rgba(var(--accent-primary-rgb), 0.6);
  transform: scale(1.3);
}

/* 栏目舞台 */
.home-stage {
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow: hidden;
}

/* 3D 标题容器：移除所有裁剪约束，允许完整居中显示 */
.hero-title-3d,
.hero-title-3d canvas {
  overflow: visible !important;
  clip-path: none !important;
  -webkit-clip-path: none !important;
  contain: none !important;
}

.home-section {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 5rem 4rem;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(40px) scale(0.98);
  transition: opacity 0.8s var(--ease-section),
              transform 0.8s var(--ease-section),
              visibility 0.8s;
  pointer-events: none;
}

.home-section.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  z-index: 2;
}

.home-section.prev {
  transform: translateY(-60px) scale(1.02);
  opacity: 0;
}

/* 通用容器 */
.section-wrap {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.section-head {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  text-wrap: balance;
}

.section-desc {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
  text-wrap: pretty;
}

/* Hero 栏目 */
.hero-section {
  text-align: center;
  min-height: 100dvh;
  padding-top: 4.5rem;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
  position: relative;
  width: 100%;
  max-width: 1100px;
}

.hero-clock {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  color: var(--text-hero);
  text-shadow: 0 0 40px rgba(var(--accent-primary-rgb), 0.35);
  opacity: 0;
  animation: clock-glow 4s ease-in-out infinite, fade-in-down 1s var(--ease-out-expo) 0.2s forwards;
}

@keyframes clock-glow {
  0%, 100% { text-shadow: 0 0 30px rgba(var(--accent-primary-rgb), 0.25); }
  50% { text-shadow: 0 0 60px rgba(var(--accent-primary-rgb), 0.55); }
}

/* Hero 轨道舞台：3D 标题居中，AI 模型图标通过 z-index 分层实现伪3D前后遮挡 */
.hero-orbit-stage {
  position: relative;
  width: min(100vw, 920px);
  height: min(50vh, 440px);
  margin-top: 3rem;
  margin-bottom: 0.5rem;
}

/* 轨道环：居中倾斜 72°，纯装饰 */
.orbit-rings-tilt {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%) rotateX(72deg);
  transform-style: preserve-3d;
  pointer-events: none;
}

/* 图标容器：覆盖整个舞台，图标用 absolute + z-index 实现前后遮挡 */
.hero-orbit-icons {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-orbit-icons .orbit-icon {
  pointer-events: auto;
}

.hero-title-3d {
  position: relative;
  z-index: 5;
  width: min(100vw, 920px);
  height: min(42vh, 380px);
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 20px 60px rgba(var(--accent-primary-rgb), 0.2));
  overflow: visible;
}

.hero-title-fallback {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-hero);
  text-shadow: 0 0 60px rgba(var(--accent-primary-rgb), 0.25);
}

.hero-brand {
  font-family: var(--font-brand);
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--text-hero);
  margin-bottom: 0.75rem;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(12px);
  animation: brand-reveal 1s var(--ease-out-expo) 0.8s forwards;
}

@keyframes brand-reveal {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 0.95; transform: translateY(0); }
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  color: var(--text-hero-muted);
  margin-bottom: 2.25rem;
  max-width: 520px;
  line-height: 1.75;
  text-wrap: pretty;
  opacity: 0;
  animation: fade-in-up 0.9s var(--ease-out-expo) 1s forwards;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  animation: fade-in-up 0.9s var(--ease-out-expo) 1.15s forwards;
}

.hero-actions .btn {
  position: relative;
  overflow: hidden;
}

.hero-actions .btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.25), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.hero-actions .btn:hover::before {
  opacity: 1;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-hero-muted);
  font-size: 0.8125rem;
  opacity: 0;
  animation: float 2.5s ease-in-out infinite, fade-in 1s ease 1.8s forwards;
}

.scroll-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.hero-scroll-hint:hover .scroll-arrow {
  border-color: rgba(255, 255, 255, 0.4);
  transform: scale(1.1);
}

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

@keyframes fade-in-down {
  from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
  to { opacity: 0.95; transform: translateX(-50%) translateY(0); }
}

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

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 0.7; }
}

/* Hero 浮动光球 */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
  animation: orb-drift 20s ease-in-out infinite alternate;
}

.hero-orb.orb-1 {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.5), transparent 70%);
  top: 10%;
  left: 15%;
  animation-duration: 24s;
}

.hero-orb.orb-2 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.35), transparent 70%);
  bottom: 20%;
  right: 12%;
  animation-duration: 18s;
  animation-delay: -6s;
}

.hero-orb.orb-3 {
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent 70%);
  top: 35%;
  right: 25%;
  animation-duration: 28s;
  animation-delay: -12s;
}

@keyframes orb-drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -40px) scale(1.08); }
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding: 0 1.5rem;
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition-property: transform, box-shadow, background, border-color;
  transition-duration: var(--transition-fast), var(--transition-base), var(--transition-base), var(--transition-base);
  transition-timing-function: ease;
  transform: translate(var(--mag-x, 0px), var(--mag-y, 0px));
}

.btn:active {
  transform: translate(var(--mag-x, 0px), var(--mag-y, 0px)) scale(0.96);
}

.btn-primary {
  background: var(--accent-primary);
  color: var(--text-on-primary);
  box-shadow: 0 4px 14px rgba(var(--accent-primary-rgb), 0.35);
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
  box-shadow: 0 8px 28px rgba(var(--accent-primary-rgb), 0.5);
  transform: translate(var(--mag-x, 0px), calc(var(--mag-y, 0px) - 2px));
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-hero);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translate(var(--mag-x, 0px), calc(var(--mag-y, 0px) - 2px));
}

/* 亮色区域通用 */
.light-section {
  background: var(--bg-page);
  color: var(--text-primary);
}

.light-section .section-title {
  color: var(--text-primary);
}

.light-section .section-desc {
  color: var(--text-secondary);
}

.circuit-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.06;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 20h30v30H20zM70 20h30v30H70zM20 70h30v30H20zM70 70h30v30H70z' fill='none' stroke='%230F172A' stroke-width='1'/%3E%3Cpath d='M50 35h20M35 50v20M85 50v20M50 85h20' stroke='%230F172A' stroke-width='1'/%3E%3Ccircle cx='35' cy='35' r='2' fill='%230F172A'/%3E%3Ccircle cx='85' cy='35' r='2' fill='%230F172A'/%3E%3Ccircle cx='35' cy='85' r='2' fill='%230F172A'/%3E%3Ccircle cx='85' cy='85' r='2' fill='%230F172A'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* 通用 eyebrow 标签 */
.section-eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 0.75rem;
  opacity: 0.8;
}

/* ====== Section 1: 左文右图悬浮（非对称 5:7） ====== */
.arch-layout {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 4rem;
  align-items: center;
}

.arch-text-side {
  z-index: 2;
}

.arch-visual-side {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
}

.arch-diagram-float {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  animation: arch-float 6s ease-in-out infinite;
}

@keyframes arch-float {
  0%, 100% { transform: translateY(0) rotate(-0.3deg); }
  50% { transform: translateY(-12px) rotate(0.3deg); }
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  color: var(--text-secondary);
  font-size: 1rem;
}

.list-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--accent-primary-subtle);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* 架构图节点 */
.arch-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-default);
  background: var(--bg-subtle);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.arch-node svg {
  color: var(--text-muted);
}

.arch-core {
  background: var(--accent-primary-subtle);
  border-color: rgba(var(--accent-primary-rgb), 0.25);
  color: var(--accent-primary);
}

.arch-core svg {
  color: var(--accent-primary);
}

.arch-line {
  width: 40px;
  height: 2px;
  background: var(--border-strong);
  border-radius: 1px;
  position: relative;
}

.arch-line::after {
  content: '';
  position: absolute;
  right: -4px;
  top: -3px;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid var(--border-strong);
}

.arch-cluster {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.arch-upstream {
  padding: 0.75rem 1rem;
  min-width: 70px;
}

/* ====== Section 2: 对角线构图（左上标题 + 右下卡片群） ====== */
.diagonal-layout {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  position: relative;
}

.diagonal-head {
  max-width: 480px;
  align-self: flex-start;
}

.diagonal-cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 1.5rem;
  width: 100%;
  max-width: 900px;
  align-self: center;
}

.diagonal-card-main {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.diagonal-card-sub {
  min-height: 140px;
}

.diagonal-card-tr {
  grid-column: 3;
  grid-row: 1;
}

.diagonal-card-br {
  grid-column: 3;
  grid-row: 2;
}

.bento-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition-property: transform, box-shadow;
  transition-duration: var(--transition-base);
  transition-timing-function: ease;
}

.bento-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.bento-large {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bento-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: var(--accent-primary-subtle);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.bento-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.bento-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ====== Hero 轨道环（围绕 3D 标题公转的装饰圈） ====== */
.orbit-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px dashed rgba(var(--accent-primary-rgb), 0.28);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.orbit-ring-1 {
  width: 520px;
  height: 520px;
}

.orbit-ring-2 {
  width: 340px;
  height: 340px;
  border-style: dotted;
  border-color: rgba(var(--accent-secondary-rgb), 0.22);
}

/* ====== Hero 公转图标：使用 inline SVG，仅公转不自转，通过 z-index 分层实现伪3D前后遮挡 ====== */
.orbit-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 54px;
  height: 54px;
  margin-top: -27px;
  margin-left: -27px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(var(--model-color-rgb, var(--accent-primary-rgb)), 0.4);
  box-shadow:
    0 8px 22px rgba(var(--model-color-rgb, var(--accent-primary-rgb)), 0.4),
    0 0 18px rgba(var(--model-color-rgb, var(--accent-primary-rgb)), 0.25),
    inset 0 0 8px rgba(255, 255, 255, 0.4);
  cursor: pointer;
  will-change: transform, opacity;
  user-select: none;
  transition: opacity 0.2s ease, filter 0.25s ease, box-shadow 0.25s ease;
}

.orbit-icon-svg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: rgb(var(--model-color-rgb, var(--accent-primary-rgb)));
  pointer-events: none;
}

.orbit-icon-svg svg {
  width: 100%;
  height: 100%;
  display: block;
}

.orbit-icon:hover {
  filter: brightness(1.08) drop-shadow(0 0 22px rgba(var(--model-color-rgb, var(--accent-primary-rgb)), 0.7));
  box-shadow:
    0 10px 28px rgba(var(--model-color-rgb, var(--accent-primary-rgb)), 0.55),
    0 0 28px rgba(var(--model-color-rgb, var(--accent-primary-rgb)), 0.4);
}

/* ====== Section 3: 海量模型（瀑布流布局） ====== */
.models-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.models-head {
  text-align: center;
  margin-bottom: 2.25rem;
}

.model-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  background: var(--bg-surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-xl);
  max-width: 480px;
  margin: 1rem auto;
}

.waterfall-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  max-width: 1200px;
  padding: 0.5rem;
  margin-top: 0.5rem;
}

.wf-card:nth-child(odd) {
  margin-top: 1.5rem;
}

.wf-card:nth-child(3n) {
  margin-top: 0.75rem;
}

.model-card {
  flex: 0 0 200px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition-property: transform, box-shadow, border-color;
  transition-duration: var(--transition-base);
  transition-timing-function: ease;
  position: relative;
}

.model-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(var(--accent-primary-rgb), 0.35);
}

.model-card h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.model-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.model-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  background: rgba(var(--model-color-rgb, var(--accent-primary-rgb)), 0.12);
  color: rgb(var(--model-color-rgb, var(--accent-primary-rgb)));
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 0 0 1px rgba(var(--model-color-rgb, var(--accent-primary-rgb)), 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.model-card:hover .model-badge {
  transform: scale(1.08) rotate(-3deg);
  box-shadow: 0 0 20px rgba(var(--model-color-rgb, var(--accent-primary-rgb)), 0.35);
}

.model-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--model-color, var(--accent-primary));
  margin-bottom: 1rem;
  box-shadow: 0 0 12px var(--model-color, var(--accent-primary));
}

.section-cta {
  margin-top: 1rem;
}

/* ====== Section 4: 免费额度（2x2 卡片网格） ====== */
.credits-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.credits-head {
  text-align: center;
  margin-bottom: 2.5rem;
}

.credits-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 1.5rem;
  width: 100%;
  max-width: 920px;
}

.credit-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.75rem 1.875rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition-property: transform, box-shadow, border-color;
  transition-duration: var(--transition-base);
  transition-timing-function: ease;
}

.credit-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(var(--accent-primary-rgb), 0.32);
}

.credit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: var(--accent-primary-subtle);
  color: var(--accent-primary);
  margin-bottom: 0.25rem;
}

.credit-card:nth-child(2) .credit-icon {
  background: var(--accent-secondary-subtle);
  color: var(--accent-secondary-hover);
}

.credit-card h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.125rem;
}

.credit-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ====== Section 5: 阶梯式错落布局 ====== */
.staircase-layout {
  display: flex;
  flex-direction: column;
}

.staircase-head {
  margin-bottom: 2rem;
}

.staircase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.stair-step {
  transition-property: transform, box-shadow;
  transition-duration: var(--transition-base);
  transition-timing-function: ease;
}

.stair-step-1 {
  margin-top: 3rem;
}

.stair-step-2 {
  margin-top: 0;
}

.stair-step-3 {
  margin-top: 1.5rem;
}

.tool-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.tool-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.tool-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: var(--accent-primary-subtle);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.tool-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.tool-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  transition-property: gap, color;
  transition-duration: var(--transition-base);
  margin-top: auto;
}

.link-arrow:hover {
  gap: 0.625rem;
  color: var(--accent-primary-hover);
}

.link-arrow svg {
  transition: transform 0.2s ease;
}

.link-arrow:hover svg {
  transform: translateX(3px);
}

/* ====== Section 6: 左右分栏（左大数字 + 右列表） ====== */
.split-layout {
  display: grid;
  grid-template-columns: 4fr 6fr;
  gap: 3rem;
  align-items: stretch;
}

.split-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.split-stats {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
}

.split-right {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.stat-big {
  padding: 2rem;
}

.stat-big .stat-value {
  font-size: 2.75rem;
}

.list-tall {
  min-height: 280px;
}

.dash-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition-property: transform, box-shadow;
  transition-duration: var(--transition-base);
  transition-timing-function: ease;
}

.dash-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  background: var(--accent-primary-subtle);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 500;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.list-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.list-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--accent-primary-subtle);
  color: var(--accent-primary);
}

.list-badge.hot {
  background: var(--accent-secondary-subtle);
  color: var(--accent-secondary-hover);
}

.model-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.model-list li {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  padding: 0.375rem 0;
  border-bottom: 1px solid var(--border-subtle);
}

.model-list li:last-child {
  border-bottom: none;
}

.model-list-loading {
  justify-content: center;
  color: var(--text-muted);
  border-bottom: none !important;
}

.model-list-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.model-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-token-usage {
  margin-left: auto;
  padding-left: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent-primary);
  white-space: nowrap;
}

.model-rank {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* Spotlight hover effect */
.spotlight-card {
  position: relative;
  overflow: hidden;
}

.spotlight-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    520px circle at var(--mx, 50%) var(--my, 50%),
    rgba(var(--accent-primary-rgb), 0.14),
    transparent 45%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

.spotlight-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(
    400px circle at var(--mx, 50%) var(--my, 50%),
    rgba(var(--accent-primary-rgb), 0.55),
    transparent 50%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

.spotlight-card:hover::before,
.spotlight-card:hover::after {
  opacity: 1;
}

.spotlight-card > * {
  position: relative;
  z-index: 1;
}

/* Section reveal animations */
.home-section.active .arch-text-side,
.home-section.active .arch-visual-side,
.home-section.active .diagonal-head,
.home-section.active .diagonal-cards,
.home-section.active .orbit-head,
.home-section.active .orbit-stage,
.home-section.active .waterfall-gallery,
.home-section.active .radial-center,
.home-section.active .radial-tiles,
.home-section.active .staircase-head,
.home-section.active .staircase-grid,
.home-section.active .split-left,
.home-section.active .split-right,
.home-section.active .section-cta {
  animation: section-reveal 0.8s var(--ease-out-expo) 0.15s both;
}

.home-section.active .hero-title-3d {
  animation: hero-title-in 1.1s var(--ease-out-expo) 0.1s both;
}

.home-section.active .arch-text-side { animation-delay: 0.18s; }
.home-section.active .arch-visual-side { animation-delay: 0.08s; }
.home-section.active .diagonal-head { animation-delay: 0.1s; }
.home-section.active .diagonal-cards { animation-delay: 0.15s; }
.home-section.active .orbit-head { animation-delay: 0.1s; }
.home-section.active .orbit-stage { animation-delay: 0.15s; }
.home-section.active .waterfall-gallery { animation-delay: 0.2s; }
.home-section.active .radial-center { animation-delay: 0.1s; }
.home-section.active .radial-tiles { animation-delay: 0.2s; }
.home-section.active .staircase-head { animation-delay: 0.1s; }
.home-section.active .staircase-grid { animation-delay: 0.15s; }
.home-section.active .split-left { animation-delay: 0.12s; }
.home-section.active .split-right { animation-delay: 0.2s; }
.home-section.active .section-cta { animation-delay: 0.28s; }

/* Stagger children inside grids */
.home-section.active .diagonal-cards > *:nth-child(1) { animation-delay: 0.15s; }
.home-section.active .diagonal-cards > *:nth-child(2) { animation-delay: 0.25s; }
.home-section.active .diagonal-cards > *:nth-child(3) { animation-delay: 0.35s; }
.home-section.active .staircase-grid > *:nth-child(1) { animation-delay: 0.15s; }
.home-section.active .staircase-grid > *:nth-child(2) { animation-delay: 0.25s; }
.home-section.active .staircase-grid > *:nth-child(3) { animation-delay: 0.35s; }
.home-section.active .radial-tiles > *:nth-child(1) { animation-delay: 0.12s; }
.home-section.active .radial-tiles > *:nth-child(2) { animation-delay: 0.22s; }
.home-section.active .radial-tiles > *:nth-child(3) { animation-delay: 0.32s; }
.home-section.active .split-left > *:nth-child(1) { animation-delay: 0.12s; }
.home-section.active .split-left .stat-big:nth-child(1) { animation-delay: 0.15s; }
.home-section.active .split-left .stat-big:nth-child(2) { animation-delay: 0.25s; }
.home-section.active .split-right > *:nth-child(1) { animation-delay: 0.18s; }
.home-section.active .split-right > *:nth-child(2) { animation-delay: 0.28s; }
.home-section.active .waterfall-gallery > *:nth-child(1) { animation-delay: 0.1s; }
.home-section.active .waterfall-gallery > *:nth-child(2) { animation-delay: 0.18s; }
.home-section.active .waterfall-gallery > *:nth-child(3) { animation-delay: 0.26s; }
.home-section.active .waterfall-gallery > *:nth-child(4) { animation-delay: 0.34s; }
.home-section.active .waterfall-gallery > *:nth-child(5) { animation-delay: 0.42s; }

@keyframes section-reveal {
  from {
    opacity: 0;
    transform: translateY(32px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes hero-title-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.94);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* 响应式 */
@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .home-section {
    padding: 6rem 2rem 3rem;
  }

  .feature-section .section-wrap {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .feature-visual {
    order: -1;
    min-height: auto;
  }

  .feature-list {
    align-items: center;
  }

  .feature-list li {
    justify-content: center;
  }

  .arch-diagram {
    flex-direction: column;
    gap: 1rem;
  }

  .arch-line {
    width: 2px;
    height: 24px;
  }

  .arch-line::after {
    right: -3px;
    top: auto;
    bottom: -4px;
    border-top: 5px solid var(--border-strong);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: none;
  }

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

  .tool-large {
    grid-column: span 2;
  }

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

  .bento-large {
    grid-row: span 1;
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .section-indicator {
    right: 1rem;
    gap: 0.75rem;
  }

  .hero-title-3d {
    height: 200px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .model-gallery {
    gap: 1rem;
  }

  .model-card {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 150px;
    max-width: 220px;
    padding: 1.25rem;
  }

  .credit-tiles {
    gap: 1rem;
  }

  .credit-tile {
    min-width: 140px;
    padding: 1.5rem;
  }

  .credit-value {
    font-size: 1.75rem;
  }

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

  .tool-large {
    grid-column: span 1;
  }

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

  .bento-large {
    grid-column: span 1;
  }

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

@media (max-width: 480px) {
  .home-section {
    padding: 5rem 1.25rem 2.5rem;
  }

  .hero-clock {
    font-size: 2rem;
  }

  .hero-brand {
    font-size: 1.5rem;
  }

  .arch-diagram {
    padding: 1.25rem;
  }

  .arch-node {
    padding: 0.875rem;
  }

  .arch-upstream {
    min-width: 60px;
    padding: 0.625rem 0.75rem;
  }
}

/* Reduced motion */
.easter-egg .hero-title-3d {
  animation: easter-spin 3s var(--ease-out-expo);
}

@keyframes easter-spin {
  0% { transform: rotateY(0deg) scale(1); }
  50% { transform: rotateY(360deg) scale(1.05); }
  100% { transform: rotateY(720deg) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .home-section {
    transition: none;
  }

  .hero-scroll-hint {
    animation: none;
  }

  .hero-orb {
    animation: none;
  }
}
