/* ============================================================
   MothPay Design System — Precision Finance Edition
   Version: 3.0
   Direction: Tech-Pixel · Sharp · Terminal · Data-Forward
   Anti-pattern: No soft blobs, no AI-gradient soup, no emoji
============================================================ */

/*
========================================
  DESIGN PRINCIPLES v3
========================================

  1. 几何精确（Geometric Precision）
     - 边角：--radius-sharp（0）/ --radius-xs（2px）/ --radius-sm（4px）
     - 避免 16px+ 大圆角用于功能卡片（保留胶囊仅用于 badge/tag）
     - 使用锐利 1px 边框 + 可选 glow，而非 box-shadow 大光晕

  2. 颜色系统
     - 主色电蓝 #0066FF → hover #3385FF（更亮，不是更暗）
     - 强调霓虹青 #00E5FF（数字/高亮，替代传统品牌绿）
     - 状态绿 #00C853（仅用于成功/合规徽章）
     - 底层背景 #050C1A（超深午夜蓝，非纯黑）
     - 卡片表面 #0A1628（稍浅，保持层次感）

  3. 字体系统
     - 标题：Space Grotesk 700（几何，字符清晰）
     - 正文：DM Sans 400/500（中性，易读）
     - 数字/代码：JetBrains Mono（等宽，精准感）
     - 【核心】所有统计数字/金额/版本号使用 Mono 字体

  4. 边框语言
     - 亮色背景区：1px solid var(--border-light)
     - 暗色背景区：1px solid var(--border-dark)
     - 激活状态：1px solid var(--brand-electric) + glow
     - 数据卡片：corner-clip 伪元素装饰（CSS 实现）

  5. 装饰语言
     - Section 标签：[// LABEL] 风格，而非单横线
     - 数字前缀：#XX 序号装饰
     - 微线条：0.5px grid 底纹（暗背景用）
     - 无装饰性动效：仅数据变化 & hover 反馈允许动效

  6. 间距节奏
     - 基于 8px 网格（--space-2 = 8px）
     - Section 标准间距 96px（--space-24）
     - 卡片内边距 32px（--space-8）

========================================
*/

/* ========================= CSS Variables ========================= */
:root {

  /* ── Brand & Electric Colors ── */
  --brand-electric:      #0066FF;   /* 主电蓝 */
  --brand-electric-lt:   #3385FF;   /* hover 更亮 */
  --brand-electric-glow: rgba(0,102,255,0.35);
  --brand-electric-muted:rgba(0,102,255,0.12);

  --neon-cyan:       #00E5FF;       /* 霓虹青，数字强调 */
  --neon-cyan-glow:  rgba(0,229,255,0.20);
  --neon-cyan-muted: rgba(0,229,255,0.08);

  --neon-amber:      #FFB300;       /* 预警/高亮 */
  --data-accent:       #F59E0B;       /* 数据高亮色 — warm amber, replaces neon-cyan for metrics */
  --data-accent-glow:  rgba(245,158,11,0.20);
  --data-accent-muted: rgba(245,158,11,0.08);
  --neon-amber-glow: rgba(255,179,0,0.20);

  --status-green:    #00C853;       /* 合规/成功状态（不用于 CTA） */
  --status-green-glow: rgba(0,200,83,0.20);
  --status-green-muted: rgba(0,200,83,0.10);

  --status-red:      #FF3D3D;       /* 错误/拒绝 */

  /* ── Background Layers ── */
  --bg-base:     #050C1A;   /* 最深底层，hero/stats/footer */
  --bg-surface:  #0A1628;   /* 卡片主背景 */
  --bg-raised:   #0F1E38;   /* 卡片悬浮层 */
  --bg-overlay:  #162644;   /* dropdown/modal 叠加层 */

  /* ── Light Background ── */
  --bg-page:     #F4F6FB;   /* 浅色 section 底色 */
  --bg-card:     #FAFBFF;   /* 白卡片 */

  /* ── Borders ── */
  --border-dark:     rgba(255,255,255,0.07);   /* 暗背景默认边框 */
  --border-dark-sm:  rgba(255,255,255,0.05);   /* 超淡 */
  --border-dark-md:  rgba(255,255,255,0.12);   /* 中等 */
  --border-dark-hi:  rgba(255,255,255,0.20);   /* 高亮 */
  --border-light:    rgba(11,30,61,0.10);      /* 亮背景边框 */
  --border-light-md: rgba(11,30,61,0.18);
  --border-electric: var(--brand-electric);

  /* ── Ink / Text Scale ── */
  --ink-950:  #020812;
  --ink-900:  #0B1E3D;
  --ink-800:  #1A2E4A;
  --ink-700:  #243B55;
  --ink-600:  #35506E;
  --ink-500:  #4A6785;
  --ink-400:  #6B87A8;
  --ink-300:  #94ACC7;
  --ink-200:  #C5D4E8;
  --ink-100:  #E4EBF5;
  --ink-50:   #F4F7FC;

  /* ── White Opacity Scale (dark bg) ── */
  --white-90: rgba(255,255,255,0.90);
  --white-80: rgba(255,255,255,0.80);
  --white-70: rgba(255,255,255,0.70);
  --white-50: rgba(255,255,255,0.50);
  --white-30: rgba(255,255,255,0.30);
  --white-12: rgba(255,255,255,0.12);
  --white-06: rgba(255,255,255,0.06);
  --white:    #FFFFFF;

  /* ── Typography ── */
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'JetBrains Mono', 'Consolas', monospace;

  /* ── Font Sizes ── */
  --text-2xs: 0.75rem;   /* 12px */
  --text-xs:  0.8125rem; /* 13px */
  --text-sm:  0.875rem;  /* 14px */
  --text-base:1rem;      /* 16px */
  --text-lg:  1.125rem;  /* 18px */
  --text-xl:  1.25rem;   /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 1.875rem;  /* 30px */
  --text-4xl: 2.25rem;   /* 36px */
  --text-5xl: 3rem;      /* 48px */
  --text-6xl: 3.75rem;   /* 60px */
  --text-7xl: 4.5rem;    /* 72px */

  /* ── Font Weights ── */
  --fw-light:    300;
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;
  --fw-extrabold:800;

  /* ── Line Heights ── */
  --lh-tight:  1.15;
  --lh-snug:   1.30;
  --lh-normal: 1.5;
  --lh-relaxed:1.75;

  /* ── Spacing (8px grid) ── */
  --space-1:  0.25rem;   /* 4px  */
  --space-2:  0.5rem;    /* 8px  */
  --space-3:  0.75rem;   /* 12px */
  --space-4:  1rem;      /* 16px */
  --space-5:  1.25rem;   /* 20px */
  --space-6:  1.5rem;    /* 24px */
  --space-8:  2rem;      /* 32px */
  --space-10: 2.5rem;    /* 40px */
  --space-12: 3rem;      /* 48px */
  --space-14: 3.5rem;    /* 56px */
  --space-16: 4rem;      /* 64px */
  --space-20: 5rem;      /* 80px */
  --space-24: 6rem;      /* 96px */
  --space-32: 8rem;      /* 128px */

  /* ── Border Radius ── */
  --radius-sharp: 0px;
  --radius-xs:    2px;
  --radius-sm:    4px;
  --radius-md:    6px;    /* 默认卡片/按钮 */
  --radius-lg:    8px;
  --radius-xl:    12px;   /* 大型面板 */
  --radius-2xl:   16px;
  --radius-full:  9999px; /* 仅用于 badge/pill */

  /* ── Shadows — Precise, not diffuse ── */
  --shadow-xs:     0 1px 2px rgba(2,8,18,0.20);
  --shadow-sm:     0 2px 6px rgba(2,8,18,0.24);
  --shadow-md:     0 4px 12px rgba(2,8,18,0.28);
  --shadow-lg:     0 8px 24px rgba(2,8,18,0.32);
  --shadow-xl:     0 16px 40px rgba(2,8,18,0.40);

  --glow-electric: 0 0 0 1px var(--brand-electric),
                   0 0 16px var(--brand-electric-glow);
  --glow-cyan:     0 0 0 1px var(--neon-cyan),
                   0 0 16px var(--neon-cyan-glow);
  --glow-green:    0 0 0 1px var(--status-green),
                   0 0 12px var(--status-green-glow);

  /* ── Transitions ── */
  --transition-fast:   120ms ease;
  --transition-normal: 220ms ease;
  --transition-slow:   380ms ease;

  /* ── Z-Index ── */
  --z-dropdown: 1000;
  --z-fixed:    1100;
  --z-modal:    1200;
  --z-toast:    1300;

  /* ── Layout ── */
  --container-sm:  640px;
  --container-md:  768px;
  --container-lg:  1024px;
  --container-xl:  1280px;
  --container-2xl: 1440px;

  /* ── Grid ── */
  --grid-dot: rgba(255,255,255,0.04);
  --grid-line: rgba(255,255,255,0.03);
  --grid-size: 40px;

  /* ── Mobile & Responsive Tokens ── */
  --touch-target-min: 44px;      /* iOS HIG / Android 触控最小目标 */
  --touch-target-md: 48px;

  /* 安全区 */
  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left:   env(safe-area-inset-left, 0px);
  --safe-right:  env(safe-area-inset-right, 0px);

  /* 响应式 Section 间距 */
  --section-mobile:  3rem;   /* 48px */
  --section-tablet:  4rem;   /* 64px */
  --section-desktop: 6rem;   /* 96px */

  /* 响应式字号 clamp */
  --text-hero:     clamp(2rem, 5vw, 3.75rem);
  --text-section:  clamp(1.5rem, 3.5vw, 2.25rem);
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--ink-700);
  background-color: var(--bg-card);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-electric);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--brand-electric-lt);
}

ul, ol { list-style: none; }

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ========================= Typography ========================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--ink-900);
  letter-spacing: -0.02em;
}

h1 { font-size: var(--text-6xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  line-height: var(--lh-relaxed);
  color: var(--ink-500);
}

/* Mono text for numbers, codes, metrics */
.text-mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* Electric gradient text */
.text-gradient {
  background: linear-gradient(90deg, var(--brand-electric) 0%, var(--neon-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-cyan { color: var(--neon-cyan); }
.text-amber { color: var(--data-accent); }
.text-green { color: var(--status-green); }

/* ========================= Layout ========================= */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container-fluid {
  width: 100%;
  padding: 0 var(--space-6);
}

.section     { padding: clamp(var(--section-mobile), 8vw, var(--section-desktop)) 0; }
.section-sm  { padding: clamp(2.5rem, 6vw, var(--section-tablet)) 0; }
.section-lg  { padding: clamp(4rem, 10vw, var(--space-32)) 0; }

/* ========================= Buttons ========================= */
.btn {
  display: inline-flex;
  min-height: var(--touch-target-min);
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  line-height: 1;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all var(--transition-normal);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.01em;
}

/* Primary: solid electric blue */
.btn-primary {
  background: var(--brand-electric);
  color: var(--white);
  border-color: var(--brand-electric);
}

.btn-primary:hover {
  background: var(--brand-electric-lt);
  border-color: var(--brand-electric-lt);
  color: var(--white);
  box-shadow: var(--glow-electric);
}

.btn-primary:active { transform: translateY(1px); }

/* Outline: sharp border, light bg */
.btn-outline {
  background: transparent;
  color: var(--ink-700);
  border-color: var(--border-light-md);
}

.btn-outline:hover {
  background: var(--ink-50);
  border-color: var(--ink-400);
  color: var(--ink-900);
}

/* Ghost: for dark backgrounds */
.btn-ghost {
  background: transparent;
  color: var(--white-70);
  border-color: var(--border-dark-md);
}

.btn-ghost:hover {
  background: var(--white-06);
  border-color: var(--border-dark-hi);
  color: var(--white);
}

/* Sizes */
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
  border-radius: var(--radius-xs);
  min-height: 32px; /* 小按钮允许小于 44px */
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
  border-radius: var(--radius-md);
}

.btn-xl {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
}

/* ========================= Focus Visible ========================= */
/* Applied only for keyboard navigation, not mouse clicks */
:focus { outline: none; }

:focus-visible {
  outline: 2px solid var(--brand-electric);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* Dark background context — use white outline */
.site-header :focus-visible,
.mobile-menu :focus-visible,
.site-footer :focus-visible,
.hero :focus-visible,
.cta-banner :focus-visible {
  outline-color: rgba(255,255,255,0.9);
  outline-offset: 3px;
}

/* Buttons get glow focus ring */
.btn:focus-visible {
  outline: 2px solid var(--brand-electric);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px var(--brand-electric-muted);
}

/* ========================= Cards ========================= */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  padding: var(--space-8);
  transition: all var(--transition-normal);
}

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

.card-sm {
  padding: var(--space-6);
  border-radius: var(--radius-sm);
}

/* Glass card for dark backgrounds */
.card-glass {
  background: var(--white-06);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-dark-md);
  border-radius: var(--radius-md);
}

/* Data card: sharp corners, glowing border on hover */
.card-data {
  background: var(--bg-surface);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-sm);
  padding: var(--space-6);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.card-data:hover {
  border-color: var(--brand-electric);
  box-shadow: 0 0 0 1px var(--brand-electric-glow);
}

/* ========================= Badges ========================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px var(--space-3);
  font-size: var(--text-2xs);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-full);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge-blue {
  background: var(--brand-electric-muted);
  color: var(--brand-electric-lt);
  border: 1px solid rgba(0,102,255,0.20);
}

.badge-cyan {
  background: var(--neon-cyan-muted);
  color: var(--neon-cyan);
  border: 1px solid rgba(0,229,255,0.20);
}

.badge-green {
  background: var(--status-green-muted);
  color: var(--status-green);
  border: 1px solid rgba(0,200,83,0.20);
}

.badge-outline {
  background: transparent;
  border: 1px solid var(--border-light-md);
  color: var(--ink-500);
}

/* ========================= Section Labels ========================= */
/* Style: [// LABEL] — terminal comment aesthetic */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  color: var(--brand-electric);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.section-label::before {
  content: '//';
  color: var(--data-accent);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.04em;
}

/* ========================= Grid Helpers ========================= */
.grid { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ========================= Flex Helpers ========================= */
.flex           { display: flex; }
.flex-col       { flex-direction: column; }
.items-center   { align-items: center; }
.justify-center { justify-content: center; }
.justify-between{ justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* ========================= Icon Box ========================= */
.icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--brand-electric-muted);
  border: 1px solid rgba(0,102,255,0.20);
  color: var(--brand-electric);
  flex-shrink: 0;
}

.icon-box-lg {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
}

.icon-box-dark {
  background: rgba(0,102,255,0.12);
  border-color: rgba(0,102,255,0.20);
  color: var(--brand-electric-lt);
}

/* ========================= Divider ========================= */
.divider {
  height: 1px;
  background: var(--border-light);
  margin: var(--space-8) 0;
}

/* ========================= Dot Grid Background ========================= */
.bg-grid-dark {
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
}

.bg-dot-dark {
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* ========================= Responsive Utilities ========================= */
@media (max-width: 1024px) {
  h1 { font-size: var(--text-5xl); }
  h2 { font-size: var(--text-3xl); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }
  .container  { padding: 0 var(--space-4); }
  .grid-4 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-xl); }
}

@media (max-width: 360px) {
  h1 { font-size: var(--text-2xl); }
  h2 { font-size: var(--text-lg); }
  .container { padding: 0 var(--space-3); }
}

/* ============================================================
   Global Layout Components — Header · Nav · Mobile Menu · Footer
   These styles are shared across ALL pages (loaded via design-system.css)
   and must NOT be scoped to homepage-only CSS files.
============================================================ */

/* ========================= Site Header ========================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-fixed);
  height: var(--header-h, 64px);
  background: rgba(8, 10, 20, 0.35);
  border-bottom: 1px solid var(--border-dark-md);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
  background: rgba(8, 10, 20, 0.72);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
}

.site-header.scrolled .nav-link {
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.site-header.scrolled .nav-link:hover {
  color: #ffffff;
  text-shadow: 0 0 12px rgba(0, 160, 255, 0.5), 0 1px 3px rgba(0, 0, 0, 0.6);
}

.header-inner {
  display: flex;
  align-items: center;
  height: 64px;
  gap: var(--space-8);
}

/* Logo */
.header-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.header-logo .logo-text {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  color: var(--white);
  letter-spacing: -0.03em;
}

.header-logo .logo-text span {
  color: var(--brand-electric);
}

/* Nav Pill */
.nav-pill {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex: 1;
  justify-content: center;
  padding: var(--space-1) var(--space-2);
}

@media (max-width: 1024px) {
  .header-inner {
    justify-content: space-between;
  }
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--white-50);
  border-radius: var(--radius-xs);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--white);
  background: var(--white-06);
}

.nav-link.active {
  color: var(--brand-electric-lt);
}

.nav-link svg {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.has-dropdown:hover .nav-chevron {
  transform: rotate(180deg);
}

/* ── Dropdown ── */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  background: rgba(6, 10, 20, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 20px 48px rgba(2, 8, 18, 0.72),
    0 4px 16px rgba(0, 0, 0, 0.50),
    0 0 60px rgba(0, 102, 255, 0.06);
  padding: 6px;
  min-width: 240px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  transform: translateX(-50%) translateY(-4px);
  z-index: var(--z-dropdown);
}

.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

.nav-dropdown::after {
  content: '';
  position: absolute;
  top: 0; left: 12px; right: 12px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand-electric), transparent);
  opacity: 0.6;
}

.has-dropdown:hover .nav-dropdown,
.nav-dropdown.keyboard-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Mega menu */
.nav-dropdown.mega {
  min-width: 500px;
  padding: 10px;
  left: 0;
  transform: translateX(0) translateY(-4px);
}

.has-dropdown:hover .nav-dropdown.mega,
.nav-dropdown.mega.keyboard-open {
  transform: translateX(0) translateY(0);
}

.mega-header {
  padding: 4px 8px 8px;
  font-family: var(--font-body);
  font-size: var(--text-2xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white-50);
  opacity: 1;
}

.mega-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-xs);
  transition: background 0.12s ease;
  text-decoration: none;
}

.dropdown-item:hover {
  background: rgba(0, 102, 255, 0.10);
}

.dropdown-item:hover .di-title {
  color: var(--white);
}

.dropdown-item:hover .di-icon {
  border-color: rgba(0, 102, 255, 0.40);
  box-shadow: 0 0 8px rgba(0, 102, 255, 0.20);
}

.di-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-dark-md);
  flex-shrink: 0;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.di-icon svg {
  width: 14px;
  height: 14px;
  stroke: var(--white-50);
  stroke-width: 1.75;
}

.dropdown-item:hover .di-icon svg {
  stroke: var(--brand-electric-lt);
}

.di-title {
  font-size: 13px;
  font-weight: var(--fw-medium);
  color: var(--white-70);
  margin-bottom: 1px;
  transition: color 0.12s ease;
  line-height: 1.3;
}

.di-desc {
  font-size: var(--text-2xs);
  color: var(--white-50);
  line-height: 1.4;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

/* Language Toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-dark-md);
  border-radius: var(--radius-full);
  padding: 2px;
  gap: 1px;
}

.lang-opt {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 28px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: var(--text-2xs);
  font-weight: var(--fw-medium);
  color: var(--white-50);
  cursor: pointer;
  border: none;
  background: transparent;
  transition: all 0.15s ease;
  letter-spacing: 0.02em;
}

.lang-opt:hover { color: var(--white-70); }

.lang-opt.active {
  background: var(--brand-electric);
  color: var(--white);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  padding: 0;
  transition: background var(--transition-fast);
  background: transparent;
  border: none;
  flex-shrink: 0;
}

.hamburger:hover { background: var(--white-06); }

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--white-70);
  border-radius: 2px;
  transition: all var(--transition-normal);
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ========================= Mobile Menu ========================= */
.mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-base);
  border-top: 1px solid var(--border-dark-md);
  overflow-y: auto;
  padding: var(--space-6);
  padding-bottom: calc(var(--space-6) + var(--safe-bottom));
  z-index: calc(var(--z-fixed) - 1);
  -webkit-overflow-scrolling: touch;
}

.mobile-menu.open { display: block; }

.mobile-nav-item {
  border-bottom: 1px solid var(--border-dark);
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) 0;
  min-height: var(--touch-target-min);
  font-size: var(--text-base);
  font-weight: var(--fw-medium);
  color: var(--white-70);
  cursor: pointer;
}

.mobile-nav-link svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
}

.mobile-nav-item.expanded .mobile-nav-link svg { transform: rotate(180deg); }

.mobile-submenu {
  display: none;
  padding: var(--space-2) 0 var(--space-4);
}

.mobile-nav-item.expanded .mobile-submenu { display: block; }

.mobile-submenu-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-2);
  min-height: var(--touch-target-min);
  border-radius: var(--radius-xs);
  font-size: var(--text-sm);
  color: var(--white-50);
  transition: background var(--transition-fast);
}

.mobile-submenu-item:hover {
  background: var(--white-06);
  color: var(--brand-electric-lt);
}

.mobile-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

/* ========================= Site Footer ========================= */
.site-footer {
  background: var(--bg-base);
  position: relative;
  padding-top: var(--space-10);
}

/* Gradient top border */
.site-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--border-dark-md) 15%,
    rgba(0,102,255,0.5) 50%,
    var(--border-dark-md) 85%,
    transparent 100%
  );
}

/* Footer main layout: 5-column grid */
.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: var(--space-10);
  padding: var(--space-14) 0 var(--space-10);
  align-items: flex-start;
}

.footer-brand { min-width: 0; }

.footer-nav-cols {
  display: contents;
}

.footer-col { min-width: 0; }

.footer-logo {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
  color: var(--white);
  margin-bottom: var(--space-3);
  letter-spacing: -0.03em;
  display: inline-block;
}

.footer-logo span { color: var(--brand-electric); }

.footer-tagline {
  font-size: var(--text-sm);
  color: var(--white-50);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--space-5);
}

.footer-badges {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}

.footer-badge {
  font-family: var(--font-body);
  font-size: var(--text-2xs);
  color: var(--white-50);
  border: 1px solid var(--border-dark-md);
  border-radius: var(--radius-full);
  padding: 3px 8px 3px 6px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.footer-badge svg {
  width: 10px;
  height: 10px;
  stroke: var(--brand-electric);
  flex-shrink: 0;
}

.footer-socials { display: flex; gap: var(--space-2); margin-bottom: var(--space-4); }

.footer-social {
  width: var(--touch-target-min);
  height: var(--touch-target-min);
  border-radius: var(--radius-xs);
  background: transparent;
  border: 1px solid var(--border-dark-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white-50);
  transition: all var(--transition-fast);
}

.footer-social svg {
  width: 15px;
  height: 15px;
}

.footer-social:hover {
  border-color: var(--brand-electric);
  color: var(--brand-electric);
  background: rgba(0, 102, 255, 0.08);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-2);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-dark-sm);
}

.footer-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  color: var(--white-50);
  transition: color var(--transition-fast);
  line-height: 1.4;
}

.footer-contact-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  stroke: var(--brand-electric);
  opacity: 0.7;
}

.footer-contact-link:hover { color: var(--white-90); }
.footer-contact-link:hover svg { opacity: 1; }

.footer-col-title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: var(--fw-semibold);
  color: var(--white);
  margin-bottom: var(--space-4);
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-dark-md);
}

.footer-links { display: flex; flex-direction: column; gap: 10px; }

.footer-link {
  font-size: var(--text-sm);
  color: var(--white-50);
  transition: color var(--transition-fast);
  line-height: 1;
}

.footer-link:hover { color: var(--white-80, rgba(255,255,255,0.8)); }

/* Compliance bar */
.footer-compliance {
  border-top: 1px solid var(--border-dark);
  padding: var(--space-5) 0;
}

.footer-compliance-text {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  color: var(--white-30);
  line-height: 1.9;
  letter-spacing: 0.02em;
  width: 100%;
  max-width: 100%;
}

.footer-bottom {
  border-top: 1px solid var(--border-dark);
  padding: var(--space-4) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--white-30);
  letter-spacing: 0.02em;
}

.footer-legal { display: flex; gap: var(--space-5); align-items: center; }

.footer-legal a {
  font-size: var(--text-xs);
  color: var(--white-30);
  transition: color var(--transition-fast);
}

.footer-legal a:hover { color: var(--white-50); }

/* ========================= Global Responsive — Header & Footer ========================= */
@media (max-width: 1200px) {
  .footer-main {
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
    gap: var(--space-8);
  }
}

@media (max-width: 1024px) {
  .nav-pill  { display: none; }
  .hamburger { display: flex; }

  .header-inner {
    justify-content: space-between;
    padding: 0;
  }

  .header-actions {
    gap: 12px;
    margin-left: auto;
  }

  .header-actions .btn { display: none; }
}

@media (max-width: 768px) {
  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
    padding: var(--space-10) 0 var(--space-8);
  }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: var(--space-4);
  }
  .footer-legal { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 480px) {
  .footer-main {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  .footer-brand { grid-column: auto; }
  .footer-bottom { padding-bottom: calc(var(--space-4) + var(--safe-bottom)); }
}

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