/* ============================
   BookScan Final Clean Styles v6
   2026-03-01 — Modern Tech · Crisp · Balanced
   ============================ */

/* Import Google Fonts (Inter for crisp english/numbers) */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  /* Colors - Clean Tech */
  --color-bg: #f8f9fc; /* Extremely subtle cool gray */
  --color-surface: #ffffff; /* Pure white cards */
  --color-surface-2: #f1f5f9; /* Soft gray for secondary items */
  --color-text: #0f172a; /* Slate 900 - rich deep blue-black */
  --color-text-muted: #64748b; /* Slate 500 - perfect readable gray */
  --color-border: #e2e8f0; /* Slate 200 - clean borders */
  --color-secondary: #0066cc; /* Trust Tech Blue */
  --color-accent: #0284c7;
  --color-glow: rgba(0, 102, 204, 0.15);
  
  /* Shadows - Layered and refined */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.02);
  --shadow-lg: 0 16px 32px -4px rgba(15, 23, 42, 0.06), 0 4px 10px rgba(15, 23, 42, 0.03);
  --glass-bg: rgba(255, 255, 255, 0.85);
  
  /* Typography - Back to Modern Sans-serif */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  
  /* Motion */
  --ease-standard: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-base: 0.3s;
}

/* --- Base --- */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  letter-spacing: -0.02em;
}

a { text-decoration: none; color: inherit; }

/* --- Typography Classes --- */
.hero-title {
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text);
}
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.1rem);
  line-height: 1.6;
  font-weight: 400;
  color: var(--color-text-muted);
  margin-top: 1rem;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.25;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.section-desc {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--color-secondary);
  background: var(--color-surface);
  border: 1px solid color-mix(in srgb, var(--color-secondary) 30%, transparent);
  padding: 2px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
}

/* --- Navigation --- */
.site-header {
  border-bottom: 1px solid transparent;
  background: transparent;
  transition: all var(--dur-base);
}
.site-header.is-scrolled {
  background: var(--glass-bg);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}
.logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text);
}
.nav-link {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--dur-base);
  padding: 6px 12px;
  border-radius: 6px;
}
.nav-link:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}

/* --- Mobile Menu --- */
.mobile-menu-btn {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 4px;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  z-index: 110;
}
.mobile-menu-btn span {
  width: 16px; height: 1.5px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all 0.25s var(--ease-standard);
}
.mobile-menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.mobile-menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.mobile-menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.mobile-panel {
  position: absolute; top: 100%; left: 0; right: 0;
  z-index: 105;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-8px);
  transition: all var(--dur-base);
}
.mobile-panel.open {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateY(0);
}
.panel-glass {
  margin: 6px 12px 0;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  padding: 12px;
}
.mobile-panel.open::before {
  content: ""; position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: -1;
}
.mobile-panel .nav-link {
  font-size: 1.05rem;
  font-weight: 500;
  padding: 12px 14px;
  display: block;
  border-radius: 8px;
  margin-bottom: 2px;
}
.mobile-panel .nav-link:hover { background: var(--color-surface-2); }

/* --- Buttons --- */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center; justify-content: center;
  height: 42px; padding: 0 24px;
  border-radius: 99px; /* Pill */
  font-size: 1rem;
  font-weight: 600;
  transition: all var(--dur-base);
  cursor: pointer;
}
.btn-primary {
  background: var(--color-secondary);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
}
.btn-primary:hover {
  background: var(--color-accent);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 102, 204, 0.3);
}
.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover {
  border-color: var(--color-text-muted);
  transform: translateY(-1px);
}

/* --- Cards --- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--dur-base);
  display: flex; flex-direction: column;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--color-secondary) 30%, var(--color-border));
}

/* Four Topics Stats Fix */
.card .text-2xl {
  color: var(--color-secondary); /* Ensure numbers are blue! */
  font-weight: 800;
}

.article-cover {
  aspect-ratio: 16/9; /* Standard wide cover */
  background: var(--color-surface-2);
  overflow: hidden;
}
.article-cover img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s var(--ease-standard);
}
.card:hover .article-cover img { transform: scale(1.04); }

/* --- Spacing --- */
.section-pad { padding: clamp(3rem, 6vw, 5rem) 0; }

/* --- Reveal Animation --- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-standard), transform 0.6s var(--ease-standard);
}
.reveal.is-visible {
  opacity: 1; transform: translateY(0);
}

.tag {
  display: inline-flex; align-items: center;
  height: 24px; padding: 0 8px; border-radius: 6px;
  font-size: 0.75rem; font-weight: 600;
  background: color-mix(in srgb, var(--color-secondary) 10%, transparent);
  color: var(--color-secondary);
}

/* --- Prose (Article details) --- */
.prose { max-width: 72ch; margin: 0 auto; color: var(--color-text); }
.prose p { margin-bottom: 1.5em; }
.prose h2 { font-size: 1.5rem; margin: 2em 0 1em; border-bottom: 1px solid var(--color-border); padding-bottom: 0.5em; }
.prose h3 { font-size: 1.25rem; margin: 1.5em 0 0.8em; }
.prose img { border-radius: 12px; margin: 2em auto; box-shadow: var(--shadow-sm); }
.prose table { width: 100%; border-collapse: collapse; margin: 2em 0; font-size: 1rem; }
.prose th { background: var(--color-surface-2); text-align: left; padding: 12px; border: 1px solid var(--color-border); }
.prose td { padding: 12px; border: 1px solid var(--color-border); }

/* Fixes for image display sizes */
img { max-width: 100%; height: auto; }

/* --- AI Editorial / Magazine Typography --- */
.callout {
  padding: 1.5rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--color-secondary) 5%, var(--color-surface-2));
  border-left: 4px solid var(--color-secondary);
  margin: 2.5rem 0;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}
.callout::before {
  content: '💡 核心洞察 / Key Takeaways';
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-secondary);
  margin-bottom: 0.8rem;
}

.pullquote {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-text);
  margin: 3rem 0;
  padding-left: 2rem;
  border-left: 4px solid var(--color-text);
  letter-spacing: -0.02em;
}

.specs-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 2.5rem 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--color-border);
}
.specs-table th {
  background: var(--color-surface-2);
  font-weight: 600;
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
}
.specs-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-muted);
}
.specs-table tr:last-child td {
  border-bottom: none;
}

.article-image {
  margin: 3rem 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--color-surface-2);
}
.article-image img {
  width: 100%;
  height: auto;
  display: block;
}
.article-image figcaption {
  padding: 12px 16px;
  font-size: 0.85rem;
  text-align: center;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

/* Make sure basic prose has breathing room */
.prose {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--color-text);
  max-width: 70ch;
  margin: 0 auto;
}
.prose h2 {
  font-size: 1.8rem;
  margin: 2.5em 0 1em;
  letter-spacing: -0.02em;
}
.prose h3 {
  font-size: 1.4rem;
  margin: 2em 0 0.8em;
}

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 40;
  width: 44px; height: 44px;
  border-radius: 99px;
  border: 1px solid var(--color-border);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--color-text-muted);
  display: flex;
  align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0; pointer-events: none;
  transform: translateY(8px);
  transition: opacity var(--dur-base), transform var(--dur-base), color var(--dur-base), border-color var(--dur-base);
  box-shadow: var(--shadow-md);
}
.back-to-top.is-visible {
  opacity: 1; pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover {
  color: var(--color-text);
  background: var(--color-surface);
  border-color: var(--color-text-muted);
}
.back-to-top svg { width: 18px; height: 18px; }
@media (max-width: 767px) {
  .back-to-top { right: 16px; bottom: 16px; }
}

/* Responsive overrides for WordPress injected styles */
.prose figure { max-width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; }
.prose img { max-width: 100% !important; height: auto !important; border-radius: 12px; box-shadow: var(--shadow-sm); }

/* --- Text Gradient Art --- */
.text-gradient {
  background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 50%, #6366f1 100%);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shine 4s linear infinite;
  display: inline-block;
  padding-right: 0.1em; /* Prevent clipping */
}
.text-gradient-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #fcd34d 100%);
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shine 4s linear infinite;
  display: inline-block;
  padding-right: 0.1em;
}

@keyframes shine {
  to { background-position: 200% center; }
}
