/* ============================================================
   FINBOOKS — Shared Page Styles
   Design tokens, reset, navigation, footer, animations.
   ============================================================ */

/* Design System & Tokens */
:root {
  /* Background层次 */
  --bg-root: #090b10;
  --bg-surface: #11141d;
  --bg-card: #181b27;
  --bg-card-hover: #1d2132;
  --bg-elevated: #202433;

  /* 边框 */
  --border-subtle: #1f2333;
  --border-default: #2a2e3f;
  --border-active: #3d4257;

  /* 文字 */
  --text-primary: #e6e7ef;
  --text-secondary: #9498ad;
  --text-muted: #5f6378;
  --text-inverse: #0d0f16;

  /* 语义色 */
  --accent-gold: #c9a84c;
  --accent-gold-dim: #8a7235;
  --accent-gold-bg: rgba(201, 168, 76, 0.08);
  --accent-gold-border: rgba(201, 168, 76, 0.18);

  --color-up: #4ecdc4;
  --color-up-bg: rgba(78, 205, 196, 0.08);
  --color-down: #e85d75;
  --color-down-bg: rgba(232, 93, 117, 0.08);

  --color-category-1: #c9a84c;
  --color-category-2: #4ecdc4;
  --color-category-3: #6c8cd9;
  --color-category-4: #e085a5;
  --color-category-5: #7ecb76;
  --color-category-6: #d4956b;

  /* 排版 */
  --font-display: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;

  /* 间距 */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* 半径 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;

  /* 阴影 */
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-elevated: 0 4px 16px rgba(0, 0, 0, 0.5), 0 12px 40px rgba(0, 0, 0, 0.3);
  --shadow-glow-gold: 0 0 30px rgba(201, 168, 76, 0.08);

  /* 过渡 */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-root);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* 背景纹理 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(201, 168, 76, 0.03), transparent),
    radial-gradient(ellipse 60% 40% at 80% 85%, rgba(78, 205, 196, 0.02), transparent);
  pointer-events: none;
  z-index: 0;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-root); }
::-webkit-scrollbar-thumb { background: var(--border-default); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-active); }

/* Focus */
:focus-visible {
  outline: 2px solid var(--accent-gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Utility */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* Navigation — Brand Only */
.nav {
  position: sticky;
  top: 0;
  z-index: 99;
  background: rgba(11, 13, 18, 0.9);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--accent-gold), #e0c56e);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-inverse);
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.brand-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  line-height: 1;
  margin-top: 1px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-16) var(--space-6) var(--space-8);
  background: var(--bg-surface);
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.footer-brand .brand-text {
  font-size: 1.25rem;
  margin-bottom: var(--space-2);
}

.footer-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 300px;
}

.footer-col-title {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-links a {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--duration-fast);
}

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

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

.footer-copyright {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-legal {
  display: flex;
  gap: var(--space-6);
}

.footer-legal a {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--duration-fast);
}

.footer-legal a:hover { color: var(--text-secondary); }

/* Scroll Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.05s; }
.reveal-delay-2 { transition-delay: 0.1s; }
.reveal-delay-3 { transition-delay: 0.15s; }
.reveal-delay-4 { transition-delay: 0.2s; }
.reveal-delay-5 { transition-delay: 0.25s; }
.reveal-delay-6 { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Responsive — shared */
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
