/* ============================================
   阙外首页 v3.0 — 三支柱布局
   依赖: quewai_tokens_v4.css + quewai_core.css
   设计DNA: 学者风骨，东方气韵
   原则: 非对称·无纯黑·微投影·中文优先
   ============================================ */

/* ===== CSS变量补丁 (核心组件引用的变量) ===== */
:root,
[data-theme="light"] {
  --qw-gold: #b8943a;
  --qw-gold-light: #c9a96e;
  --qw-gold-subtle: rgba(184, 148, 58, 0.08);
  --qw-text: #000000;
  --qw-text-secondary: #3D3A37;
  --qw-text-muted: #6B6662;
  --qw-text-subtle: #A09A94;
  --qw-shadow: 0 1px 3px rgba(0,0,0,0.02), 0 0 0 1px rgba(0,0,0,0.03);
  --qw-shadow-sm: 0 1px 2px rgba(0,0,0,0.02);
  --qw-shadow-md: 0 4px 12px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.03);
  --qw-shadow-lg: 0 8px 24px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04);
  --qw-border-focus: rgba(184, 148, 58, 0.3);
  --qw-brand: #000000;
  --qw-brand-light: #3D3A37;
  --qw-brand-subtle: rgba(0,0,0,0.03);
  --qw-success: #1E8449;
  --qw-success-bg: rgba(30,132,73,0.08);
}

[data-theme="dark"] {
  --qw-gold: #c9a96e;
  --qw-gold-light: #d4b87a;
  --qw-gold-subtle: rgba(201, 169, 110, 0.08);
  --qw-text: #F7F8F8;
  --qw-text-secondary: #D0D6E0;
  --qw-text-muted: #8A8F98;
  --qw-text-subtle: #5D6268;
  --qw-shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --qw-shadow-md: 0 4px 12px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
  --qw-shadow-lg: 0 8px 24px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.06);
}

[data-theme="cool"] {
  --qw-gold: #b8943a;
  --qw-gold-light: #c9a96e;
  --qw-gold-subtle: rgba(184, 148, 58, 0.08);
  --qw-text: #1D1F23;
  --qw-text-secondary: #4A4F57;
  --qw-text-muted: #7B8089;
  --qw-text-subtle: #A8ADB5;
}

/* ===== Theme Toggle Button ===== */
.qw-theme-toggle {
  background: none;
  border: 1px solid var(--qw-border);
  border-radius: var(--qw-radius-full);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  color: var(--qw-text-muted);
  transition: all var(--qw-motion-fast) var(--qw-ease-standard);
  flex-shrink: 0;
}
.qw-theme-toggle:hover {
  color: var(--qw-gold);
  border-color: var(--qw-gold);
}

/* ===== HERO ===== */
.qw-hero {
  padding: var(--qw-space-3xl) 0 var(--qw-space-2xl);
  text-align: center;
  background: var(--qw-bg);
}

.qw-hero-title {
  font-family: var(--qw-serif);
  font-size: 3.5rem;
  font-weight: var(--qw-weight-heading);
  letter-spacing: var(--qw-tracking-display);
  color: var(--qw-ink);
  margin: 0 0 var(--qw-space-md);
  line-height: 1.2;
  text-wrap: balance;
}

.qw-hero-subtitle {
  font-size: var(--qw-text-lg);
  color: var(--qw-ink-muted);
  margin: 0 0 var(--qw-space-2xl);
  font-weight: 400;
  letter-spacing: 0.02em;
}

/* Hero pillar cards — asymmetric layout */
.qw-hero-pillars {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap: var(--qw-space-lg);
  max-width: 1100px;
  margin: 0 auto;
  align-items: start;
}

.qw-hero-pillar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: var(--qw-space-xl);
  background: var(--qw-surface);
  border: 1px solid var(--qw-border-light);
  border-radius: var(--qw-radius-xl);
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.qw-hero-pillar:hover {
  transform: translateY(-4px);
  border-color: var(--qw-gold);
  box-shadow: var(--qw-shadow-lg);
}

.qw-hero-pillar-featured {
  border-color: var(--qw-gold);
  background: var(--qw-insight-bg);
  box-shadow: var(--qw-shadow-md);
}

.qw-hero-pillar-icon {
  font-size: 1.8rem;
  margin-bottom: var(--qw-space-sm);
  color: var(--qw-gold);
  line-height: 1;
}

.qw-hero-pillar-name {
  font-family: var(--qw-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--qw-ink);
  margin: 0 0 var(--qw-space-sm);
  letter-spacing: 0.03em;
}

.qw-hero-pillar-desc {
  font-size: 0.88rem;
  color: var(--qw-ink-muted);
  line-height: 1.65;
  margin: 0 0 var(--qw-space-md);
  flex: 1;
}

.qw-hero-pillar-cta {
  font-size: 0.8rem;
  font-weight: 550;
  color: var(--qw-gold);
  letter-spacing: 0.03em;
  transition: transform 0.25s ease;
}
.qw-hero-pillar:hover .qw-hero-pillar-cta {
  transform: translateX(4px);
}

/* ===== PILLAR SECTIONS ===== */
.qw-pillar-section {
  padding: var(--qw-space-3xl) 0;
}

.qw-pillar-alt {
  background: var(--qw-surface-alt);
}

.qw-pillar-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--qw-space-3xl);
  align-items: center;
}

.qw-pillar-grid-reverse {
  grid-template-columns: 0.9fr 1.1fr;
}

.qw-pillar-grid-reverse .qw-pillar-content {
  order: 2;
}
.qw-pillar-grid-reverse .qw-pillar-visual {
  order: 1;
}

.qw-pillar-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--qw-gold);
  margin-bottom: var(--qw-space-sm);
}

.qw-pillar-title {
  font-family: var(--qw-serif);
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--qw-ink);
  margin: 0 0 var(--qw-space-md);
  line-height: 1.25;
}

.qw-pillar-subtitle {
  font-size: var(--qw-text-lg);
  color: var(--qw-ink-muted);
  line-height: 1.7;
  margin: 0 0 var(--qw-space-xl);
  text-wrap: balance;
}

.qw-pillar-subtitle em {
  font-style: normal;
  color: var(--qw-gold);
  font-weight: 550;
}

.qw-pillar-header-center {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--qw-space-2xl);
}

.qw-pillar-header-center .qw-pillar-subtitle {
  text-wrap: balance;
}

/* ===== FEATURE LIST ===== */
.qw-feature-list {
  list-style: none;
  margin: 0 0 var(--qw-space-xl);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--qw-space-md);
}

.qw-feature-list li {
  padding-left: var(--qw-space-lg);
  position: relative;
  line-height: 1.65;
}

.qw-feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--qw-gold);
  opacity: 0.6;
}

.qw-feature-list li strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--qw-ink);
  margin-bottom: 2px;
}

.qw-feature-list li span {
  font-size: 0.85rem;
  color: var(--qw-ink-muted);
}

/* ===== PILLAR VISUALS ===== */
.qw-pillar-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--qw-space-md);
}

.qw-pillar-visual-caption {
  font-size: 0.75rem;
  color: var(--qw-ink-subtle);
  text-align: center;
  margin-top: var(--qw-space-sm);
}

/* Agent diagram */
.qw-agent-diagram {
  display: flex;
  align-items: center;
  gap: var(--qw-space-sm);
  padding: var(--qw-space-xl);
  background: var(--qw-surface);
  border: 1px solid var(--qw-border-light);
  border-radius: var(--qw-radius-xl);
  box-shadow: var(--qw-shadow-sm);
  flex-wrap: wrap;
  justify-content: center;
}

.qw-agent-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: var(--qw-space-md);
  background: var(--qw-insight-bg);
  border: 1px solid var(--qw-border-light);
  border-radius: var(--qw-radius-lg);
  font-size: 0.75rem;
  font-weight: 550;
  color: var(--qw-ink-secondary);
  min-width: 70px;
  text-align: center;
  transition: all 0.3s ease;
}

.qw-agent-node span {
  font-size: 1.3rem;
  line-height: 1;
}

.qw-agent-arrow {
  color: var(--qw-gold);
  font-size: 1.2rem;
  font-weight: 600;
  opacity: 0.5;
}

/* Report layer stack */
.qw-report-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  max-width: 320px;
}

.qw-report-layer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--qw-space-md) var(--qw-space-lg);
  border-radius: var(--qw-radius-md);
  transition: all 0.3s ease;
}

.qw-report-layer-label {
  font-size: 0.9rem;
  font-weight: 550;
  color: var(--qw-ink);
}

.qw-report-layer-time {
  font-size: 0.75rem;
  font-family: var(--qw-mono);
  color: var(--qw-ink-muted);
}

.qw-report-l1 {
  background: var(--qw-insight-bg);
  border: 1px solid var(--qw-gold);
  box-shadow: 0 2px 8px rgba(184,148,58,0.1);
}
.qw-report-l2 {
  background: var(--qw-surface);
  border: 1px solid var(--qw-border);
  opacity: 0.85;
}
.qw-report-l3 {
  background: var(--qw-surface);
  border: 1px solid var(--qw-border-light);
  opacity: 0.65;
}
.qw-report-l4 {
  background: var(--qw-surface-subtle);
  border: 1px solid var(--qw-border-light);
  opacity: 0.45;
  font-size: 0.8rem;
}
.qw-report-l4 .qw-report-layer-label,
.qw-report-l4 .qw-report-layer-time {
  font-size: 0.75rem;
}

/* ===== CAPABILITY GRID ===== */
.qw-capability-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--qw-space-lg);
  margin-bottom: var(--qw-space-xl);
}

.qw-capability-card {
  padding: var(--qw-space-xl);
  background: var(--qw-surface);
  border: 1px solid var(--qw-border-light);
  border-radius: var(--qw-radius-lg);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.qw-capability-card:hover {
  border-color: var(--qw-gold);
  box-shadow: var(--qw-shadow-md);
  transform: translateY(-2px);
}

.qw-capability-card h4 {
  font-family: var(--qw-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--qw-ink);
  margin: 0 0 var(--qw-space-sm);
  letter-spacing: 0.02em;
}

.qw-capability-card p {
  font-size: 0.85rem;
  color: var(--qw-ink-muted);
  line-height: 1.65;
  margin: 0;
}

.qw-pillar-cta-center {
  text-align: center;
  margin-top: var(--qw-space-lg);
}

/* ===== INDICATOR TICKER ===== */
.qw-indicator-ticker {
  display: flex;
  justify-content: center;
  gap: var(--qw-space-xl);
  padding: var(--qw-space-lg);
  margin-bottom: var(--qw-space-2xl);
  background: var(--qw-surface);
  border: 1px solid var(--qw-border-light);
  border-radius: var(--qw-radius-lg);
  flex-wrap: wrap;
}

.qw-indicator-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 80px;
}

.qw-indicator-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--qw-ink-muted);
}

.qw-indicator-value {
  font-size: 1.1rem;
  font-family: var(--qw-mono);
  font-weight: 550;
  color: var(--qw-ink);
}

/* ===== TRUST STRIP ===== */
.qw-trust-section {
  padding: var(--qw-space-xl) 0;
  background: var(--qw-surface-alt);
  border-top: 1px solid var(--qw-border-light);
  border-bottom: 1px solid var(--qw-border-light);
}

.qw-trust-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--qw-space-xl);
  flex-wrap: wrap;
}

.qw-trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.qw-trust-value {
  font-size: 1.5rem;
  font-family: var(--qw-mono);
  font-weight: 600;
  color: var(--qw-gold);
  letter-spacing: -0.02em;
}

.qw-trust-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--qw-ink-muted);
  letter-spacing: 0.04em;
}

.qw-trust-divider {
  width: 1px;
  height: 40px;
  background: var(--qw-border);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .qw-hero-title {
    font-size: 2.5rem;
  }

  .qw-hero-pillars {
    grid-template-columns: 1fr;
    max-width: 500px;
  }

  .qw-hero-pillar {
    text-align: center;
    align-items: center;
  }

  .qw-pillar-grid,
  .qw-pillar-grid-reverse {
    grid-template-columns: 1fr;
    gap: var(--qw-space-xl);
  }

  .qw-pillar-grid-reverse .qw-pillar-content {
    order: 1;
  }
  .qw-pillar-grid-reverse .qw-pillar-visual {
    order: 2;
  }

  .qw-pillar-title {
    font-size: 1.8rem;
  }

  .qw-capability-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .qw-agent-diagram {
    flex-direction: column;
    gap: var(--qw-space-sm);
  }
  .qw-agent-arrow {
    transform: rotate(90deg);
  }
}

@media (max-width: 768px) {
  .qw-hero {
    padding: var(--qw-space-2xl) 0 var(--qw-space-xl);
  }

  .qw-hero-title {
    font-size: 2rem;
  }

  .qw-hero-subtitle {
    font-size: 1rem;
  }

  .qw-pillar-section {
    padding: var(--qw-space-2xl) 0;
  }

  .qw-pillar-title {
    font-size: 1.5rem;
  }

  .qw-pillar-subtitle {
    font-size: 1rem;
  }

  .qw-capability-grid {
    grid-template-columns: 1fr;
    gap: var(--qw-space-md);
  }

  .qw-indicator-ticker {
    gap: var(--qw-space-md);
  }

  .qw-trust-strip {
    gap: var(--qw-space-md);
  }

  .qw-trust-value {
    font-size: 1.2rem;
  }

  .qw-trust-divider {
    display: none;
  }

  .qw-feature-list li {
    padding-left: var(--qw-space-md);
  }

  /* Mobile: hide nav links, keep brand + toggle */
  .qw-nav-links {
    display: none;
  }

  .qw-report-stack {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .qw-hero-title {
    font-size: 1.65rem;
  }

  .qw-container {
    padding: 0 var(--qw-space-md);
  }

  .qw-indicator-ticker {
    gap: var(--qw-space-sm);
  }

  .qw-indicator-item {
    min-width: 60px;
  }
}

/* ===== PRINT ===== */
@media print {
  .qw-nav,
  .qw-theme-toggle,
  .qw-footer {
    display: none;
  }
  .qw-hero {
    padding: 1rem 0;
  }
  body {
    background: #fff;
    color: #000;
  }
}
