/*
 * xiaoxin.chat - Main Stylesheet
 * Version: v1.0
 * Style Guide: 蓝色编辑感科技风 (Serif & Pure CSS Clean-tech)
 */

/* ==========================================================================
   1. Design Tokens & CSS Variables
   ========================================================================== */
:root {
  --background: #F7FBFF;
  --foreground: #10233F;
  --muted: #EEF6FF;
  --muted-2: #F3F8FD;
  --muted-foreground: #5C708D;
  --subtle-foreground: #7C8DA6;
  --card: #FFFFFF;
  --border: #D8E7F5;
  --border-strong: #BBD3EA;
  --rule: #CFE0EF;

  --primary: #075FEA;
  --primary-hover: #004FCC;
  --primary-soft: #E5F1FF;
  --primary-foreground: #FFFFFF;
  --accent-cyan: #17C9E8;
  --accent-cyan-soft: #DDF9FF;
  --signal: #FF8A3D;
  --ring: #0B7CFF;

  --navy: #0A2A66;
  --navy-2: #061A3D;
  --code-bg: #0B1220;
  --code-border: #1B335C;
  --code-text: #D9E8FF;

  /* Status */
  --success: #12A66A;
  --warning: #F59E0B;
  --danger: #E5484D;
  --info: #0EA5E9;

  /* Font Stacks */
  --font-serif: "Playfair Display", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", Georgia, serif;
  --font-sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  
  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(16, 35, 63, 0.04);
  --shadow-md: 0 4px 12px rgba(16, 35, 63, 0.06);
  --shadow-lg: 0 12px 32px rgba(16, 35, 63, 0.08);
}

/* ==========================================================================
   2. Base & Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  background-color: var(--background);
  color: var(--foreground);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
}

/* Skip Link for Accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 10px 20px;
  z-index: 10000;
  text-decoration: none;
  font-weight: 600;
  border-radius: 6px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 20px;
  outline: 2px solid var(--ring);
}

/* Scrollbar Style */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--background);
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Typography Elements */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.25;
}

p {
  color: var(--muted-foreground);
  margin-bottom: 1.25rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

a:hover {
  color: var(--primary-hover);
}

/* Base Layout Containers */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Section Common Structure */
section {
  padding: 108px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}

section:last-of-type {
  border-bottom: none;
}

/* Section Labels & Headings */
.section-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.section-label span {
  display: block;
  height: 1px;
  background: var(--rule);
  flex-grow: 1;
  max-width: 80px;
}

.section-label strong {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--primary);
  text-transform: uppercase;
}

.section-title {
  text-align: center;
  font-size: 38px;
  color: var(--foreground);
  margin-bottom: 16px;
  font-family: var(--font-serif);
}

.section-description {
  text-align: center;
  font-size: 18px;
  color: var(--muted-foreground);
  max-width: 760px;
  margin: 0 auto 56px auto;
}

/* ==========================================================================
   3. Header & Navigation (Glassmorphic)
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header--scrolled {
  background: rgba(247, 251, 255, 0.85);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--foreground);
  text-decoration: none;
  white-space: nowrap; /* 绝对禁止Logo折行 */
  flex-shrink: 0;      /* 防止被右侧菜单挤压 */
}

.logo img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

/* 导航包裹容器 */
.nav-links {
  display: flex;
  align-items: center;
  flex-grow: 1;
}

/* 中间导航菜单样式 */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  flex-wrap: nowrap;
}

.nav-links a {
  color: var(--muted-foreground);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
  white-space: nowrap; /* 绝对禁止菜单链接折行 */
}

.nav-links a:hover {
  color: var(--primary);
}

/* 右侧行动按钮区样式 */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-switch {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-foreground);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 4px;
  background: transparent;
  transition: all 0.2s ease;
}

.lang-switch:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-soft);
}

/* PC大屏上：采用绝对水平对称的黄金Grid三段式排版 */
@media (min-width: 1025px) {
  .nav-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr; /* 三网格：左-中-右对称分布 */
    align-items: center;
    column-gap: 24px; /* 强力物理安全防线：确保在极限宽度下，Logo与第一项、最后一项与按钮之间永远有优雅的隔离间距 */
  }
  
  .logo {
    justify-self: start; /* 强力锁定最左侧 */
  }
  
  /* 核心布局黑魔法：在PC端让包裹容器本身不参与栅格渲染，将其子菜单和行动区直接释放给Grid容器 */
  .nav-links {
    display: contents; 
  }
  
  .nav-menu {
    justify-self: center; /* 强力锁定整个页面的绝对正中心！完美消除任何因Logo与右侧按钮宽度不对称造成的居中偏心 */
    gap: 24px;
  }
  
  /* 英文版导航专属微调：由于英文单词较长，大幅收窄菜单项间距（从24px精简至16px）以防菜单区过宽，提升整体干练与精致感 */
  html[lang="en"] .nav-menu {
    gap: 16px;
  }
  
  .nav-actions {
    justify-self: end;  /* 强力锁定最右侧 */
  }
}

/* 在宽视口PC上，菜单与行动区可以更加舒展，增加呼吸感 */
@media (min-width: 1280px) {
  @media (min-width: 1025px) {
    .nav-container {
      column-gap: 32px;
    }
    .nav-menu {
      gap: 32px;
    }
    /* 宽屏PC上英文导航间距微调至极其匀称的20px */
    html[lang="en"] .nav-menu {
      gap: 20px;
    }
  }
}

/* Mobile Nav Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--foreground);
  cursor: pointer;
  padding: 8px;
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* ==========================================================================
   4. Hero Section
   ========================================================================== */
.hero {
  padding: 160px 0 108px 0;
  background: radial-gradient(circle at top right, rgba(23, 201, 232, 0.03), transparent 40%),
              radial-gradient(circle at top left, rgba(7, 95, 234, 0.04), transparent 50%);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background: linear-gradient(to top, var(--background), transparent);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 48px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--primary);
  text-transform: uppercase;
  background: var(--primary-soft);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 24px;
}

.hero-h1 {
  font-size: 60px;
  font-family: var(--font-serif);
  color: var(--foreground);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: 26px;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 24px;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

@media (min-width: 1025px) {
  :lang(en) .hero-sub {
    font-size: 22px;
    white-space: nowrap;
  }
}

.hero-divider {
  width: 80px;
  height: 2px;
  background: var(--primary);
  margin-bottom: 24px;
}

.hero-desc {
  font-size: 17px;
  color: var(--muted-foreground);
  line-height: 1.8;
  margin-bottom: 28px;
  max-width: 600px;
}

.hero-boundary-note {
  font-size: 13.5px;
  color: var(--subtle-foreground);
  background: var(--muted-2);
  border-left: 3px solid var(--border-strong);
  padding: 8px 16px;
  border-radius: 0 6px 6px 0;
  margin-bottom: 32px;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 36px;
  width: 100%;
}

.hero-bullets {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--subtle-foreground);
}

.hero-bullets span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-bullets span::before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  background-color: var(--primary);
  border-radius: 50%;
}

@media (min-width: 1025px) {
  :lang(en) .hero-bullets {
    flex-wrap: nowrap;
    width: max-content;
    max-width: none;
    gap: 16px 22px;
    white-space: nowrap;
  }

  :lang(en) .hero-bullets span {
    flex: 0 0 auto;
  }
}

/* Hero Visual Assets */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-visual-bg {
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(7, 95, 234, 0.05) 0%, transparent 70%);
  z-index: 1;
}

.hero-visual-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-icon-container {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  background: white;
  box-shadow: var(--shadow-lg), 0 20px 40px rgba(7, 95, 234, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
  position: relative;
  border: 1px solid var(--border);
  animation: float 6s ease-in-out infinite;
}

.hero-icon-container img {
  width: 90px;
  height: 90px;
  border-radius: 18px;
}

/* Voice Wave Animation */
.voice-wave {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 50px;
  margin-top: 16px;
}

.voice-wave span {
  display: block;
  width: 4px;
  height: 12px;
  background: linear-gradient(to top, var(--primary), var(--accent-cyan));
  border-radius: 2px;
  animation: wave 1.2s ease-in-out infinite alternate;
}

.voice-wave span:nth-child(2) { height: 28px; animation-delay: 0.15s; }
.voice-wave span:nth-child(3) { height: 42px; animation-delay: 0.3s; }
.voice-wave span:nth-child(4) { height: 20px; animation-delay: 0.45s; }
.voice-wave span:nth-child(5) { height: 35px; animation-delay: 0.6s; }
.voice-wave span:nth-child(6) { height: 16px; animation-delay: 0.75s; }

/* ==========================================================================
   5. Buttons (克制、高对比)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  font-family: var(--font-sans);
}

.btn--primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 2px 8px rgba(7, 95, 234, 0.2);
}

.btn--primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(7, 95, 234, 0.3);
}

.btn--secondary {
  background-color: var(--card);
  color: var(--foreground);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.btn--secondary:hover {
  background-color: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}

.btn--ghost {
  background-color: transparent;
  color: var(--muted-foreground);
  border: 1px solid transparent;
}

.btn--ghost:hover {
  color: var(--primary);
}

/* ==========================================================================
   6. Section: Project Boundary (它是与不是)
   ========================================================================== */
.boundary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 24px;
}

.boundary-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: all 0.3s ease;
}

.boundary-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--rule);
  border-radius: 8px 8px 0 0;
  transition: background 0.3s ease;
}

.boundary-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.boundary-card:hover::before {
  background: var(--primary);
}

.boundary-card:nth-child(2):hover::before {
  background: var(--accent-cyan);
}

.boundary-card:nth-child(3):hover::before {
  background: var(--signal);
}

.boundary-card h3 {
  font-family: var(--font-sans);
  font-size: 20px;
  color: var(--foreground);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.boundary-card h3 svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.boundary-list {
  list-style: none;
}

.boundary-list li {
  position: relative;
  padding-left: 20px;
  font-size: 15px;
  color: var(--muted-foreground);
  margin-bottom: 12px;
}

.boundary-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--border-strong);
}

.boundary-card:hover .boundary-list li::before {
  color: var(--primary);
}
.boundary-card:nth-child(2):hover .boundary-list li::before {
  color: var(--accent-cyan);
}
.boundary-card:nth-child(3):hover .boundary-list li::before {
  color: var(--signal);
}

.boundary-action {
  margin-top: 24px;
}

/* ==========================================================================
   7. Section: Why Screen-based Voice Terminal (带屏差异)
   ========================================================================== */
.screen-value {
  background: var(--muted-2);
  --scenarios-offset: 160px;
}

:lang(en) .screen-value {
  --scenarios-offset: 210px;
}

.screen-value-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 56px;
  align-items: start;
}

.screen-value-left {
  display: flex;
  flex-direction: column;
}

.screen-value-left h2 {
  font-size: 34px;
  margin-bottom: 24px;
  text-align: left;
}

.screen-value-left p {
  font-size: 16.5px;
  line-height: 1.8;
  margin-bottom: 24px;
}

:lang(en) .screen-value-left p {
  line-height: 1.68;
  margin-bottom: 18px;
}

:lang(en) .screen-value-left p:nth-of-type(2) {
  margin-bottom: 10px;
}

.comparison-box {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  padding: 24px;
  margin-top: 16px;
}

:lang(en) .comparison-box {
  padding: 22px 24px;
  margin-top: 8px;
}

.comparison-box h4 {
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comparison-box ul {
  list-style: none;
}

.comparison-box li {
  font-size: 14.5px;
  color: var(--muted-foreground);
  margin-bottom: 8px;
  line-height: 1.65;
  position: relative;
  padding-left: 18px;
}

:lang(en) .comparison-box li {
  margin-bottom: 6px;
  line-height: 1.58;
}

.comparison-box li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
}

/* Scenarios Cards on the right */
.scenarios-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: var(--scenarios-offset);
}

.scenario-bar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: all 0.25s ease;
}

.scenario-bar:hover {
  transform: translateX(4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.scenario-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.scenario-icon svg {
  width: 20px;
  height: 20px;
}

.scenario-body h4 {
  font-family: var(--font-sans);
  font-size: 17px;
  color: var(--foreground);
  margin-bottom: 4px;
}

.scenario-body p {
  font-size: 14px;
  color: var(--muted-foreground);
  margin-bottom: 0;
}

/* ==========================================================================
   8. Section: Core Capabilities Overview (能力概览)
   ========================================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
  transition: all 0.3s ease;
  position: relative;
}

.feature-item::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--rule);
  border-radius: 8px 8px 0 0;
  transition: background 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.feature-item:hover::before {
  background: var(--primary);
}

.feature-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.feature-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--subtle-foreground);
}

.feature-head h3 {
  font-family: var(--font-sans);
  font-size: 18px;
  color: var(--foreground);
}

.feature-item p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted-foreground);
  margin-bottom: 0;
}

/* ==========================================================================
   9. Section: Streamlined Conversation (流畅对话工程)
   ========================================================================== */
.conversation-engineering {
  background: var(--muted-2);
}

.engineering-timeline {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  padding-left: 20px;
}

.engineering-timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 31px;
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary), var(--accent-cyan), var(--border));
}

.timeline-step {
  display: flex;
  gap: 24px;
  position: relative;
}

.timeline-node {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--card);
  border: 4px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 2;
  transition: all 0.3s ease;
}

.timeline-step:hover .timeline-node {
  transform: scale(1.2);
  background: var(--primary-foreground);
  box-shadow: 0 0 12px rgba(7, 95, 234, 0.4);
}

.timeline-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  flex-grow: 1;
  box-shadow: var(--shadow-sm);
  transition: border 0.3s ease;
}

.timeline-step:hover .timeline-card {
  border-color: var(--border-strong);
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.timeline-header h4 {
  font-family: var(--font-sans);
  font-size: 17px;
  color: var(--foreground);
  display: flex;
  align-items: center;
  gap: 12px;
}

.timeline-idx {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 1px 6px;
  border-radius: 4px;
}

.timeline-card p {
  font-size: 14.5px;
  color: var(--muted-foreground);
  margin-bottom: 0;
}

.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.timeline-tags span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--subtle-foreground);
  background: var(--muted-2);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.timeline-conclusion {
  max-width: 860px;
  margin: 48px auto 0 auto;
  padding: 22px 26px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  background: var(--card);
  font-family: var(--font-sans);
  font-size: 16.5px;
  font-weight: 400;
  color: var(--muted-foreground);
  line-height: 1.8;
  text-align: left;
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   10. Section: Technical Architecture (技术架构图)
   ========================================================================== */
.arch-diagram-wrapper {
  margin-top: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.arch-diagram-wrapper--image {
  padding-bottom: 4px;
}

.architecture-image {
  display: block;
  width: 100%;
  min-width: 960px;
  height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   11. Section: H5 Bridge & Code (H5 语音能力)
   ========================================================================== */
.h5-bridge {
  background: var(--muted-2);
}

.bridge-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

@media (min-width: 1025px) {
  :lang(en) .bridge-grid {
    grid-template-columns: minmax(0, 1.28fr) minmax(0, 0.92fr);
    gap: 40px;
  }

  :lang(en) .bridge-title {
    font-size: clamp(31px, 3.1vw, 36px);
    white-space: nowrap;
  }
}

.bridge-left {
  display: flex;
  flex-direction: column;
}

.bridge-label {
  justify-content: flex-start;
  margin-bottom: 26px;
}

.bridge-label span {
  flex: 0 0 80px;
  max-width: 80px;
}

.bridge-title {
  margin: 0 0 18px;
  color: var(--foreground);
  font-family: var(--font-serif);
  font-size: 36px;
  line-height: 1.25;
  letter-spacing: 0;
}

.bridge-description {
  max-width: 620px;
  margin: 0 0 32px;
  color: var(--muted-foreground);
  font-size: 16.5px;
  line-height: 1.8;
}

.bridge-subtitle {
  font-family: var(--font-sans);
  font-size: 20px;
  line-height: 1.35;
  color: var(--foreground);
  margin: 0 0 16px;
}

.api-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.api-pill {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--primary);
  background: var(--card);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.api-pill::after {
  content: "→";
  color: var(--border-strong);
  transition: transform 0.2s ease;
}

.api-pill:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.api-pill:hover::after {
  color: var(--primary);
  transform: translateX(2px);
}

.bridge-doc-actions {
  margin-top: 30px;
}

.bridge-doc-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.bridge-doc-link:hover {
  color: var(--primary-hover);
}

.bridge-doc-link span {
  transition: transform 0.2s ease;
}

.bridge-doc-link:hover span {
  transform: translateX(3px);
}

/* Code Block Styles */
.code-wrapper {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  width: 100%;
}

.code-header {
  background: rgba(27, 51, 92, 0.4);
  padding: 10px 16px;
  border-bottom: 1px solid var(--code-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.code-title {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--code-text);
}

.btn-copy {
  background: transparent;
  border: 1px solid var(--code-border);
  color: var(--code-text);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy:hover {
  background: var(--code-border);
  color: white;
}

.code-body pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
}

.code-body code {
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.6;
  color: #D9E8FF;
}

/* Syntax Highlighting */
.code-comment  { color: #6A9955; }
.code-keyword  { color: #569CD6; }
.code-string   { color: #CE9178; }
.code-function { color: #DCDCAA; }

/* ==========================================================================
   12. Section: Device & Scenario Showcases (设备与截图展示)
   ========================================================================== */
.showcase-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.tab-btn {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted-foreground);
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 500;
  padding: 8px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  border-color: var(--border-strong);
  color: var(--foreground);
}

.tab-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 2px 6px rgba(7, 95, 234, 0.2);
}

.showcase-carousel {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 56px;
}

.showcase-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.showcase-viewport::-webkit-scrollbar {
  display: none;
}

.showcase-grid {
  display: flex;
  gap: 24px;
}

.showcase-item {
  flex: 0 0 calc((100% - 24px) / 2);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.showcase-item.is-hidden {
  display: none;
}

.showcase-item:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.showcase-media {
  width: 100%;
  height: 520px;
  background: linear-gradient(180deg, #F7FBFF 0%, #ECF5FF 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  cursor: zoom-in;
}

.showcase-media img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 18px;
  transition: transform 0.3s ease;
}

.showcase-item:hover .showcase-media img {
  transform: scale(1.03);
}

.showcase-info {
  padding: 16px 18px;
}

.showcase-info h4 {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--foreground);
  margin-bottom: 0;
}

.showcase-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  transition: all 0.2s ease;
}

.showcase-nav:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-foreground);
  transform: translateY(-50%) scale(1.04);
}

.showcase-nav:disabled {
  cursor: default;
  opacity: 0.38;
  box-shadow: none;
}

.showcase-nav svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.showcase-nav--prev {
  left: 0;
}

.showcase-nav--next {
  right: 0;
}

/* Modal for Image Preview */
.image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(16, 35, 63, 0.85);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 32px;
  backdrop-filter: blur(8px);
}

.image-modal-content {
  max-width: min(96vw, 1180px);
  max-height: calc(100vh - 64px);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-modal-content img {
  max-width: 100%;
  max-height: calc(100vh - 88px);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--card);
}

.image-modal-close {
  position: absolute;
  top: -48px;
  right: 0;
  color: white;
  font-size: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
}

/* ==========================================================================
   13. Section: Downloads & Dev entries (下载与文档)
   ========================================================================== */
.download-section {
  background: var(--muted-2);
}

.download-cards {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  margin-bottom: 56px;
}

.download-main-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 40px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.download-main-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary);
  border-radius: 8px 8px 0 0;
}

.download-main-card h3 {
  font-family: var(--font-sans);
  font-size: 22px;
  color: var(--foreground);
  margin-bottom: 8px;
}

.download-main-card p {
  font-size: 15px;
  color: var(--muted-foreground);
  margin-bottom: 48px;
}

.download-platforms {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.platform-box {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: all 0.2s ease;
}

.platform-box:hover {
  border-color: var(--border-strong);
  background: var(--muted-2);
}

.platform-box h4 {
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--foreground);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.platform-box p {
  font-size: 13px;
  color: var(--subtle-foreground);
  margin-bottom: 16px;
}

.platform-box .btn {
  min-width: 0;
  padding: 0 12px;
  text-align: center;
  line-height: 1.2;
}

.download-sub-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

.download-sub-card h3 {
  font-family: var(--font-sans);
  font-size: 20px;
  color: var(--foreground);
  margin-bottom: 16px;
}

.download-sub-card p {
  font-size: 14.5px;
  margin-bottom: 16px;
}

.dev-steps {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: 6px;
  padding: 42px 16px 16px;
  color: var(--code-text);
  margin-bottom: 16px;
  position: relative;
  overflow-x: auto;
}

.dev-steps code {
  display: block;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Document cards */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.doc-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

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

.doc-card h4 {
  font-family: var(--font-sans);
  font-size: 17px;
  color: var(--foreground);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.doc-card h4 svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.doc-card p {
  font-size: 13.5px;
  color: var(--muted-foreground);
  margin-bottom: 20px;
  line-height: 1.6;
}

.doc-link {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.doc-link span {
  transition: transform 0.2s ease;
}

.doc-card:hover .doc-link span {
  transform: translateX(3px);
}

/* ==========================================================================
   14. Section: Real-tech Insights & FAQ (技术地图与FAQ)
   ========================================================================== */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 56px;
}

.insight-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 28px;
  display: flex;
  gap: 20px;
  transition: all 0.25s ease;
}

.insight-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.insight-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--muted-2);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.insight-icon svg {
  width: 22px;
  height: 22px;
}

.insight-body h4 {
  font-family: var(--font-sans);
  font-size: 17px;
  color: var(--foreground);
  margin-bottom: 6px;
}

.insight-body p {
  font-size: 14px;
  color: var(--muted-foreground);
  margin-bottom: 12px;
  line-height: 1.6;
}

.insight-link {
  font-size: 13.5px;
  font-weight: 500;
}

/* License notes block */
.license-box {
  background: var(--primary-soft);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 24px 32px;
  margin-bottom: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.license-info h4 {
  font-family: var(--font-sans);
  font-size: 17px;
  color: var(--foreground);
  margin-bottom: 4px;
}

.license-info p {
  font-size: 14px;
  color: var(--muted-foreground);
  margin-bottom: 0;
}

.license-actions {
  display: flex;
  gap: 12px;
}

/* FAQ Layout */
.faq-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 860px;
  margin: 0 auto;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  background: transparent;
  border: none;
  padding: 20px 24px;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 16.5px;
  font-weight: 600;
  color: var(--foreground);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question svg {
  width: 18px;
  height: 18px;
  color: var(--subtle-foreground);
  transition: transform 0.25s ease;
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease-out;
  border-top: 1px solid transparent;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  border-top: 1px solid var(--border);
}

.faq-answer-inner {
  padding: 20px 24px;
  font-size: 15px;
  color: var(--muted-foreground);
  line-height: 1.7;
}

/* ==========================================================================
   15. Section: Author & Community (作者与社群)
   ========================================================================== */
.community-section {
  background: var(--muted-2);
}

.community-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: start;
}

.author-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

.author-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.author-avatar svg {
  width: 32px;
  height: 32px;
}

.author-meta h3 {
  font-family: var(--font-sans);
  font-size: 20px;
  color: var(--foreground);
}

.author-meta p {
  font-size: 13.5px;
  color: var(--subtle-foreground);
  margin-bottom: 0;
}

.author-bio {
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted-foreground);
  margin-bottom: 28px;
}

.author-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.community-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 40px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.community-card h3 {
  font-family: var(--font-sans);
  font-size: 20px;
  color: var(--foreground);
  margin-bottom: 8px;
}

.community-card p {
  font-size: 14.5px;
  color: var(--muted-foreground);
  margin-bottom: 24px;
  max-width: 320px;
}

.qr-code-box {
  width: 180px;
  height: 180px;
  background: var(--muted-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-code-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.community-note {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--subtle-foreground);
}

/* ==========================================================================
   16. Footer (深色收尾)
   ========================================================================== */
.site-footer {
  background: var(--navy-2);
  color: #8DA2C4;
  padding: 80px 0 40px 0;
  border-top: 1px solid var(--code-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 64px;
}

.footer-brand h3 {
  color: white;
  font-size: 22px;
  margin-bottom: 16px;
}

.footer-brand p {
  color: #8DA2C4;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 0;
}

.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 15px;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 24px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: #8DA2C4;
  font-size: 14px;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--accent-cyan);
}

.footer-divider {
  height: 1px;
  background: var(--code-border);
  margin-bottom: 32px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-disclaimer {
  font-size: 13px;
  max-width: 680px;
  line-height: 1.6;
}

.footer-copyright {
  font-size: 13px;
}

/* ==========================================================================
   17. Keyframe Animations (微动效)
   ========================================================================== */
@keyframes float {
  0% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}

@keyframes wave {
  0% { transform: scaleY(0.4); }
  100% { transform: scaleY(1.2); }
}

@keyframes bounce-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ==========================================================================
   18. Responsive Media Queries (响应式排版)
   ========================================================================== */

/* Mobile & Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
  section {
    padding: 80px 0;
  }
  
  .hero-h1 {
    font-size: 46px;
  }
  
  .hero-sub {
    font-size: 22px;
  }
  
  .boundary-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .screen-value-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .screen-value,
  :lang(en) .screen-value {
    --scenarios-offset: 0px;
  }

  .scenarios-grid {
    margin-top: 0;
  }
  
  .bridge-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .download-cards {
    grid-template-columns: 1fr;
  }
  
  .docs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .insights-grid {
    grid-template-columns: 1fr;
  }
  
  .community-grid {
    grid-template-columns: 1fr;
  }
  
  .showcase-carousel {
    padding: 0 48px;
  }

  .showcase-media {
    height: 480px;
  }

  /* Header 折叠菜单处理 */
  .site-header {
    background: rgba(247, 251, 255, 0.95);
    border-bottom: 1px solid var(--border);
  }
  
  .menu-toggle {
    display: block;
  }
  
  .nav-links {
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background: var(--background);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 24px;
    gap: 24px;
    display: none;
    box-shadow: var(--shadow-md);
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .nav-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    list-style: none;
  }
  
  .nav-menu li {
    width: 100%;
    text-align: center;
  }
  
  .nav-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    margin-top: 8px;
    border-top: 1px solid var(--border);
    padding-top: 20px;
  }
  
  .hero {
    padding: 120px 0 80px 0;
  }
  
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  
  .hero-content {
    align-items: center;
  }
  
  .hero-divider {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .hero-actions .btn {
    width: 100%;
  }
  
  .hero-bullets {
    justify-content: center;
  }
  
  .section-title {
    font-size: 28px;
  }
  
  .engineering-timeline::before {
    left: 11px;
  }
  
  .timeline-node {
    width: 20px;
    height: 20px;
    border-width: 3px;
  }
  
  .timeline-step {
    padding-left: 0;
    gap: 16px;
  }
  
  .arch-diagram-wrapper {
    margin-left: -20px;
    margin-right: -20px;
    padding: 0 20px 8px;
  }

  .architecture-image {
    min-width: 920px;
  }

  .bridge-title {
    font-size: 32px;
  }

  .bridge-description {
    max-width: none;
  }
  
  .api-list {
    grid-template-columns: 1fr;
  }
  
  .license-box {
    flex-direction: column;
    text-align: center;
    padding: 20px;
  }
  
  .license-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .license-actions .btn {
    width: 100%;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* For small mobile phone (max-width: 480px) */
@media (max-width: 480px) {
  .features-grid,
  .docs-grid {
    grid-template-columns: 1fr;
  }

  .showcase-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .showcase-carousel {
    padding: 0 40px;
  }

  .showcase-item {
    flex-basis: 100%;
  }

  .showcase-media {
    height: min(560px, 70vh);
  }

  .showcase-nav {
    width: 36px;
    height: 36px;
  }
}

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