/* ============================================================================
   蓝狮娱乐 · BLUE LION ORBIT
   core.css —— 设计令牌 / 重置 / 基础排版
   级联层级：reset → tokens → base → shell → blocks
   ========================================================================== */

@layer reset, tokens, base, shell, blocks;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body, h1, h2, h3, h4, h5, p, figure, blockquote, dl, dd { margin: 0; }
  ul, ol { margin: 0; padding: 0; list-style: none; }
  img, svg { display: block; max-width: 100%; }
  a { color: inherit; text-decoration: none; }
  button, input, select, textarea { font: inherit; color: inherit; background: none; border: 0; }
  button { cursor: pointer; }
  table { border-collapse: collapse; width: 100%; }
  summary::-webkit-details-marker { display: none; }
  [hidden] { display: none !important; }
  :focus-visible { outline: 2px solid var(--lx-cyan); outline-offset: 3px; border-radius: 6px; }
}

@layer tokens {
  :root {
    color-scheme: dark;

    /* 底色：深空墨到面板蓝 */
    --lx-void: #04070e;
    --lx-ink: #070c18;
    --lx-ink2: #091124;
    --lx-surface: #0d1730;
    --lx-surface2: #111f3f;

    /* 主色：狮蓝 / 峡谷青 / 狮鬃金 */
    --lx-blue: #2f6bff;
    --lx-blue2: #6d9bff;
    --lx-cyan: #22e0c8;
    --lx-gold: #f4b942;
    --lx-gold2: #ffd782;

    /* 文字 */
    --lx-text: #e9efff;
    --lx-text2: #b3c0dc;
    --lx-muted: #7f8db1;

    /* 线 / 纸 */
    --lx-line: rgba(126, 158, 255, .16);
    --lx-line2: rgba(126, 158, 255, .3);
    --lx-paper: #eef2fc;
    --lx-paper2: #dee6f8;
    --lx-paper-ink: #0a1226;
    --lx-paper-muted: #4a577a;

    /* 圆角：以环形/胶囊为主 */
    --lx-r-s: 10px;
    --lx-r-m: 18px;
    --lx-r-l: 28px;
    --lx-r-full: 999px;

    --lx-shadow: 0 30px 70px -40px rgba(2, 6, 18, .95);
    --lx-glow: 0 0 0 1px rgba(47, 107, 255, .35), 0 0 38px -8px rgba(47, 107, 255, .55);

    /* 字体 */
    --lx-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
    --lx-mono: "IBM Plex Mono", "Cascadia Mono", "SFMono-Regular", Consolas, monospace;

    /* 节奏 */
    --lx-shell: min(1180px, 100% - 40px);
    --lx-gap: clamp(18px, 2.4vw, 32px);
    --lx-band: clamp(58px, 7.6vw, 104px);
  }
}

@layer base {
  html { scroll-behavior: smooth; }

  body {
    font-family: var(--lx-sans);
    font-size: clamp(15px, .35vw + 14px, 16.5px);
    line-height: 1.75;
    color: var(--lx-text);
    background: var(--lx-ink);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }

  /* 全站环轨底纹：两处冷光 + 极细环 */
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
      radial-gradient(circle at 82% -8%, rgba(47, 107, 255, .20), transparent 52%),
      radial-gradient(circle at 4% 8%, rgba(34, 224, 200, .10), transparent 44%);
  }
  body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: .35;
    background:
      repeating-radial-gradient(circle at 88% 4%, rgba(126, 158, 255, .10) 0 1px, transparent 1px 78px);
  }
  body > * { position: relative; z-index: 1; }

  h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.22;
    letter-spacing: -.01em;
    text-wrap: balance;
  }
  h1 { font-size: clamp(30px, 4.4vw, 60px); letter-spacing: -.03em; }
  h2 { font-size: clamp(24px, 2.8vw, 38px); letter-spacing: -.02em; }
  h3 { font-size: clamp(18px, 1.4vw, 22px); }
  p { text-wrap: pretty; }
  strong, b { font-weight: 700; }
  small { font-size: 12.5px; }

  ::selection { background: rgba(47, 107, 255, .42); color: #fff; }

  /* 滚动条 */
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track { background: var(--lx-void); }
  ::-webkit-scrollbar-thumb { background: #1b2b4e; border-radius: var(--lx-r-full); }
  ::-webkit-scrollbar-thumb:hover { background: #27406f; }

  /* 通用工具类 */
  .lx-shell { width: var(--lx-shell); margin-inline: auto; }
  .lx-mono { font-family: var(--lx-mono); font-variant-numeric: tabular-nums; }
  .lx-mt { margin-top: var(--lx-gap); }
  .lx-mt-s { margin-top: 12px; }
  .lx-center { text-align: center; }
  .lx-sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

  /* 仪表环：需要有 @property 才可过渡 */
  @property --lx-v {
    syntax: "<number>";
    inherits: false;
    initial-value: 0;
  }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
      animation-duration: .001ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: .001ms !important;
    }
  }
}
