/* ============================================================
   Limit Radar 官网样式 — 基础层
   设计令牌、重置、导航与页脚（与 iOS App 视觉语言对齐）
   ============================================================ */

/* ---------- 设计令牌 ---------- */
:root {
  color-scheme: light;
  --bg: #f2f2f7;
  --bg-elevated: #ffffff;
  --bg-hero: #101113;
  --bg-hero-2: #1d1f23;
  --text: #111114;
  --text-2: #55555e;
  --text-3: #8e8e93;
  --line: rgba(0, 0, 0, 0.08);
  --accent: #007aff;
  --accent-soft: rgba(0, 122, 255, 0.12);
  --green: #34c759;
  --orange: #ff9500;
  --icon-glow: rgba(255, 59, 48, 0.38);
  --card-radius: 18px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
  --shadow-strong: 0 18px 44px rgba(0, 0, 0, 0.18);
  --max-w: 1080px;
  --nav-h: 64px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --bg-elevated: #1c1c1e;
  --bg-hero: #0c0c0e;
  --bg-hero-2: #17181c;
  --text: #f2f2f7;
  --text-2: #b9b9c2;
  --text-3: #7c7c84;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #0a84ff;
  --accent-soft: rgba(10, 132, 255, 0.18);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-strong: 0 18px 44px rgba(0, 0, 0, 0.6);
}

/* ---------- 基础重置 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Roboto, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul {
  list-style: none;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- 跳转链接（无障碍） ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 12px 0;
  z-index: 200;
}

.skip-link:focus {
  left: 0;
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.brand:hover .brand-logo {
  transform: scale(1.06);
}

.brand-logo {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 8px;
  transition: transform 0.2s ease;
}

.footer-brand .brand-logo {
  width: 40px;
  height: 40px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-links a {
  color: var(--text-2);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 10px;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--accent-soft);
  text-decoration: none;
}

.nav-links a[aria-current="page"] {
  color: var(--accent);
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: var(--bg-elevated);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.15s ease;
}

.icon-btn:hover {
  transform: scale(1.06);
}

.icon-btn:active {
  transform: scale(0.96);
}

/* 主题切换按钮：浅色模式仅显示月亮（点击切深色），深色模式仅显示太阳（点击切浅色） */
[data-theme-toggle] .icon-sun {
  display: none;
}

[data-theme-toggle] svg {
  transition: transform 0.35s ease, opacity 0.35s ease;
}

[data-theme="dark"] [data-theme-toggle] .icon-sun {
  display: block;
  animation: icon-in 0.35s ease;
}

[data-theme="dark"] [data-theme-toggle] .icon-moon {
  display: none;
}

@keyframes icon-in {
  from {
    transform: rotate(-90deg) scale(0.6);
    opacity: 0;
  }
  to {
    transform: rotate(0) scale(1);
    opacity: 1;
  }
}

/* 移动端汉堡按钮（桌面隐藏，见 responsive.css）：开合状态切换菜单/关闭图标 */
.menu-btn {
  display: none;
}

.menu-btn .icon-x {
  display: none;
}

.menu-btn[aria-expanded="true"] .icon-menu {
  display: none;
}

.menu-btn[aria-expanded="true"] .icon-x {
  display: block;
  animation: icon-in 0.25s ease;
}

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 32px;
  margin-top: 40px;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-brand {
  max-width: 320px;
}

.footer-brand .brand {
  margin-bottom: 8px;
}

.footer-brand p {
  font-size: 13.5px;
  color: var(--text-2);
}

.footer-col p {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 10px;
}

.footer-col a {
  display: block;
  color: var(--text-2);
  font-size: 14.5px;
  padding: 4px 0;
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  color: var(--text-3);
  font-size: 13px;
}

/* ---------- 滚动进入动效 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .eyebrow .dot {
    animation: none;
  }
  [data-theme-toggle] svg,
  [data-theme-toggle] .icon-sun,
  .menu-btn .icon-x {
    animation: none;
    transition: none;
  }
}
