/* ============================================
   TOBI Embodied AI — Brand CSS
   八字色彩定位：罗坤 1990年二月初一寅时
   甲木日主 · 寅月木旺 · 喜水火既济
   主色：深靛蓝(水) + 科技橙红(火)
   行业：金(科技/精密制造) — 以水泄金生木
   ============================================ */

:root {
  /* ===== 品牌主色系 — 深靛蓝(水) ===== */
  --tobi-primary: #0B1F3A;
  --tobi-primary-foreground: #FFFFFF;
  --tobi-primary-50: #E8EDF5;
  --tobi-primary-100: #C7D2E6;
  --tobi-primary-200: #9CAFD0;
  --tobi-primary-300: #6B86B5;
  --tobi-primary-400: #3D5A8A;
  --tobi-primary-500: #1A3A66;
  --tobi-primary-600: #0B1F3A;
  --tobi-primary-700: #061226;
  --tobi-primary-800: #030C1A;
  --tobi-primary-900: #01060F;

  /* ===== 火色点缀系 — 科技橙红(火·泄秀) ===== */
  --tobi-flame: #FF5B2E;
  --tobi-flame-foreground: #FFFFFF;
  --tobi-flame-50: #FFF0EB;
  --tobi-flame-100: #FFDDD0;
  --tobi-flame-200: #FFB89A;
  --tobi-flame-300: #FF8F60;
  --tobi-flame-400: #FF7045;
  --tobi-flame-500: #FF5B2E;
  --tobi-flame-600: #E64A1F;

  /* ===== 中性色系 ===== */
  --tobi-background: #F8FAFC;
  --tobi-foreground: #0F172A;
  --tobi-card: #FFFFFF;
  --tobi-card-foreground: #1E293B;
  --tobi-popover: #FFFFFF;
  --tobi-popover-foreground: #0F172A;
  --tobi-muted: #F1F5F9;
  --tobi-muted-foreground: #64748B;
  --tobi-border: #E2E8F0;
  --tobi-input: #E2E8F0;
  --tobi-ring: #0B1F3A;

  /* ===== 语义别名 ===== */
  --tobi-radius-small: 4px;
  --tobi-radius-medium: 8px;
  --tobi-radius-large: 12px;
  --tobi-radius-full: 9999px;

  /* ===== 状态色 ===== */
  --state-success: #16A34A;
  --state-warning: #F59E0B;
  --state-error: #DC2626;
  --state-info: #0EA5E9;

  /* ===== 字体系统 ===== */
  --font-cn: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --font-en: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;

  /* ===== 字号层级 ===== */
  --font-size-hero: 56px;
  --font-size-h1: 40px;
  --font-size-h2: 32px;
  --font-size-h3: 24px;
  --font-size-h4: 20px;
  --font-size-body-lg: 18px;
  --font-size-body: 16px;
  --font-size-body-sm: 14px;
  --font-size-caption: 13px;
  --font-size-label: 12px;

  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --line-height-tight: 1.2;
  --line-height-snug: 1.35;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;
  --line-height-loose: 1.9;

  /* ===== 间距系统 ===== */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;
  --space-4xl: 128px;

  /* ===== 阴影系统(静态≤0.05) ===== */
  --shadow-sm: 0 1px 2px rgba(11, 31, 58, 0.04);
  --shadow-md: 0 4px 12px rgba(11, 31, 58, 0.05);
  --shadow-lg: 0 12px 32px rgba(11, 31, 58, 0.05);
  --shadow-glow-flame: 0 4px 20px rgba(255, 91, 46, 0.15);

  /* ===== 过渡 ===== */
  --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

/* ===== Dark mode (hero/tech sections) ===== */
.dark {
  --tobi-background: #061226;
  --tobi-foreground: #E8EDF5;
  --tobi-card: #0B1F3A;
  --tobi-card-foreground: #C7D2E6;
  --tobi-muted: #1A3A66;
  --tobi-muted-foreground: #6B86B5;
  --tobi-border: #1A3A66;
  --tobi-input: #1A3A66;
}

/* ===== 全局重置 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-cn);
  font-size: var(--font-size-body);
  line-height: var(--line-height-relaxed);
  color: var(--tobi-foreground);
  background: var(--tobi-background);
}

/* ===== 品牌渐变 ===== */
.tobi-gradient-hero {
  background: linear-gradient(135deg, #030C1A 0%, #0B1F3A 40%, #061226 70%, #01060F 100%);
}
.tobi-gradient-flame {
  background: linear-gradient(135deg, #FF5B2E 0%, #FF7045 50%, #E64A1F 100%);
}
.tobi-gradient-card {
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
}
.tobi-gradient-glow {
  background: radial-gradient(ellipse at center, rgba(255, 91, 46, 0.08) 0%, transparent 70%);
}

/* ===== Tailwind @theme mapping ===== */
@theme inline {
  --color-tobi-primary: var(--tobi-primary);
  --color-tobi-primary-foreground: var(--tobi-primary-foreground);
  --color-tobi-flame: var(--tobi-flame);
  --color-tobi-flame-foreground: var(--tobi-flame-foreground);
  --color-tobi-background: var(--tobi-background);
  --color-tobi-foreground: var(--tobi-foreground);
  --color-tobi-card: var(--tobi-card);
  --color-tobi-card-foreground: var(--tobi-card-foreground);
  --color-tobi-muted: var(--tobi-muted);
  --color-tobi-muted-foreground: var(--tobi-muted-foreground);
  --color-tobi-border: var(--tobi-border);
  --color-tobi-input: var(--tobi-input);
  --color-tobi-ring: var(--tobi-ring);
  --color-state-success: var(--state-success);
  --color-state-warning: var(--state-warning);
  --color-state-error: var(--state-error);
  --color-state-info: var(--state-info);
  --radius-tobi-sm: var(--tobi-radius-small);
  --radius-tobi-md: var(--tobi-radius-medium);
  --radius-tobi-lg: var(--tobi-radius-large);
  --radius-tobi-full: var(--tobi-radius-full);
  --font-cn: var(--font-cn);
  --font-en: var(--font-en);
  --font-mono: var(--font-mono);
}

/* ===== 语义Token回退 ===== */
.semantic-token-fallback {
  --background: var(--tobi-background);
  --foreground: var(--tobi-foreground);
  --card: var(--tobi-card);
  --card-foreground: var(--tobi-card-foreground);
  --popover: var(--tobi-popover);
  --popover-foreground: var(--tobi-popover-foreground);
  --primary: var(--tobi-primary);
  --primary-foreground: var(--tobi-primary-foreground);
  --muted: var(--tobi-muted);
  --muted-foreground: var(--tobi-muted-foreground);
  --border: var(--tobi-border);
  --input: var(--tobi-input);
  --ring: var(--tobi-ring);
  --radius-sm: var(--tobi-radius-small);
  --radius-md: var(--tobi-radius-medium);
  --radius-lg: var(--tobi-radius-large);
  --radius-full: var(--tobi-radius-full);
}
