/* ==========================================
   XUANWU THEME — White Minimal
   Style: Clean white background, dark text, subtle blue accent
   Font: DM Sans (headings) + Inter (body)
   ========================================== */

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  color: #1a1a2e;
  background: #ffffff;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; }

/* ── TYPOGRAPHY ── */
.display-xl {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #111827;
}
.display-lg {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: #111827;
}
.display-md {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #111827;
}
.body-lg {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: #6b7280;
}
.body-sm {
  font-size: 0.875rem;
  line-height: 1.65;
  color: #9ca3af;
}
.label-sm {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9ca3af;
}
.section-eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #3b82f6;
  font-family: 'Inter', sans-serif;
}

/* ── LAYOUT ── */
.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section-padding {
  padding: 5rem 0;
}

/* ── GRID SYSTEM ── */
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-10 { gap: 2.5rem; }
.gap-12 { gap: 3rem; }
.gap-16 { gap: 4rem; }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }

/* ── FLEX ── */
.flex { display: flex; min-width: 0; min-height: 0; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }

/* ── SPACING ── */
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-14 { margin-bottom: 3.5rem; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.pt-3 { padding-top: 0.75rem; }
.pt-5 { padding-top: 1.25rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-7 { padding: 1.75rem; }
.p-8 { padding: 2rem; }
.p-10 { padding: 2.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }

/* ── BUTTONS ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  background: #111827;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}
.btn-primary:hover {
  background: #1f2937;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.15);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  background: transparent;
  color: #374151;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}
.btn-secondary:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: color 0.15s ease;
  font-family: 'Inter', sans-serif;
}
.btn-ghost:hover { color: #111827; }

/* ── BADGE ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.75rem;
  background: #f0f4ff;
  color: #3b82f6;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 100px;
  border: 1px solid #dbeafe;
}

/* ── CARDS ── */
.card-clean {
  background: #ffffff;
  border: 1px solid #f0f0f5;
  border-radius: 12px;
  transition: all 0.25s ease;
}
.card-clean:hover {
  border-color: #e0e0ea;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
}
.surface-card {
  background: #fafafa;
  border: 1px solid #f0f0f5;
  border-radius: 12px;
}

/* ── FORM INPUTS ── */
.input-field {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #111827;
  font-family: 'Inter', sans-serif;
  transition: all 0.15s ease;
  outline: none;
}
.input-field::placeholder { color: #d1d5db; }
.input-field:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
textarea.input-field { resize: none; }
select.input-field { appearance: none; }

/* ── FEATURE ITEM ── */
.feature-item {
  padding: 1rem 1.25rem;
  background: #fafafa;
  border: 1px solid #f0f0f5;
  border-radius: 10px;
  transition: all 0.2s ease;
}
.feature-item:hover {
  background: #f5f5fa;
  border-color: #e5e5ee;
}

/* ── STAT NUMBER ── */
.stat-number {
  font-family: 'DM Sans', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #111827;
  line-height: 1;
}
.stat-number-sm {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #111827;
  line-height: 1;
}

/* ── STEP NUMBER ── */
.step-number {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f0f4ff;
  color: #3b82f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
}

/* ── LOGO MARK ── */
.logo-mark {
  width: 32px;
  height: 32px;
  background: #111827;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-mark span {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #ffffff;
}

/* ── NAV LINK ── */
.nav-link {
  font-size: 0.875rem;
  font-weight: 450;
  color: #6b7280;
  transition: color 0.15s ease;
  cursor: pointer;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  display: inline-block;
}
.nav-link:hover {
  color: #111827;
  background: #f9fafb;
}
.nav-link.active {
  color: #111827;
  background: #f3f4f6;
  font-weight: 500;
}

/* ── GRADIENT TEXT ── */
.gradient-text {
  background: linear-gradient(135deg, #111827 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── HOVER LIFT ── */
.hover-lift {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.hover-lift:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

/* ── NAVBAR ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid #f0f0f5;
  transition: all 0.3s ease;
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

/* ── FOOTER ── */
.footer {
  background: #fafafa;
  border-top: 1px solid #f0f0f5;
}
.footer-link {
  font-size: 0.875rem;
  color: #9ca3af;
  transition: color 0.15s ease;
}
.footer-link:hover { color: #374151; }

/* ── BREADCRUMB ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #9ca3af;
  margin-bottom: 1rem;
}
.breadcrumb a { transition: color 0.15s ease; }
.breadcrumb a:hover { color: #374151; }
.breadcrumb .current { color: #374151; }

/* ── CHECK ICON ── */
.check-icon {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: #f0f4ff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── FAQ ── */
.faq-item {
  background: #ffffff;
  border: 1px solid #f0f0f5;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.15s ease;
}
.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease;
}
.faq-trigger:hover { background: #fafafa; }
.faq-content {
  padding: 0 1.25rem 1.25rem;
}

/* ── TABS ── */
.tab-nav {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid #f0f0f5;
}
.tab-btn {
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  color: #9ca3af;
  font-weight: 400;
  background: transparent;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.tab-btn:hover { color: #6b7280; }
.tab-btn.active {
  color: #111827;
  font-weight: 500;
  border-bottom-color: #111827;
}

/* ── POST LIST ── */
.post-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid #f0f0f5;
  transition: all 0.15s ease;
}
.post-item:last-child { border-bottom: none; }
.post-item:hover { background: #fafafa; margin: 0 -1rem; padding-left: 1rem; padding-right: 1rem; border-radius: 8px; }
.post-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.5rem;
  transition: color 0.15s ease;
}
.post-title:hover { color: #3b82f6; }
.post-meta {
  font-size: 0.75rem;
  color: #9ca3af;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.post-excerpt {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.65;
  margin-top: 0.5rem;
}

/* ── PAGINATION ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}
.page-btn {
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.15s ease;
}
.page-btn:hover { background: #f9fafb; border-color: #d1d5db; }
.page-btn.active { background: #111827; color: #ffffff; border-color: #111827; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.2); }

/* ── SELECTION ── */
::selection {
  background: rgba(59, 130, 246, 0.15);
  color: #111827;
}

/* ── ANIMATIONS ── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.animate-fade-up { animation: fade-up 0.6s ease forwards; }
.animate-fade-in { animation: fade-in 0.5s ease forwards; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .lg-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .lg-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .lg-grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 768px) {
  .grid-cols-2, .grid-cols-3, .grid-cols-4, .grid-cols-5 {
    grid-template-columns: 1fr;
  }
  .col-span-2, .col-span-3 { grid-column: span 1; }
  .section-padding { padding: 3rem 0; }
  .stat-number { font-size: 2rem; }
  .navbar-desktop { display: none; }
  .navbar-mobile-btn { display: block; }
  .hero-grid { grid-template-columns: 1fr; }
}
@media (min-width: 768px) {
  .md-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .md-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
  .navbar-mobile-btn { display: none; }
}
@media (min-width: 640px) {
  .sm-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}

/* ── UTILITIES ── */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.max-w-xs { max-width: 20rem; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.w-full { width: 100%; }
.h-16 { height: 4rem; }
.rounded-xl { border-radius: 12px; }
.rounded-lg { border-radius: 8px; }
.rounded-md { border-radius: 6px; }
.rounded-full { border-radius: 9999px; }
.overflow-hidden { overflow: hidden; }
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.z-10 { z-index: 10; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.pointer-events-none { pointer-events: none; }
.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }
.hidden { display: none; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }
.object-contain { object-fit: contain; }

/* ── ARTICLE CONTENT ── */
.article-content {
  font-size: 1rem;
  line-height: 1.8;
  color: #374151;
}
.article-content h1 {
  font-family: 'DM Sans', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
  margin: 2rem 0 1rem;
  letter-spacing: -0.02em;
}
.article-content h2 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
  margin: 1.75rem 0 0.75rem;
  letter-spacing: -0.015em;
}
.article-content h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin: 1.5rem 0 0.5rem;
}
.article-content p {
  margin-bottom: 1rem;
}
.article-content a {
  color: #3b82f6;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.article-content a:hover {
  color: #2563eb;
}
.article-content ul, .article-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}
.article-content li {
  margin-bottom: 0.5rem;
}
.article-content blockquote {
  border-left: 3px solid #e5e7eb;
  padding: 0.75rem 1.25rem;
  margin: 1.25rem 0;
  color: #6b7280;
  background: #fafafa;
  border-radius: 0 8px 8px 0;
}
.article-content pre {
  background: #1f2937;
  color: #e5e7eb;
  padding: 1.25rem;
  border-radius: 10px;
  overflow-x: auto;
  margin: 1.25rem 0;
  font-size: 0.875rem;
  line-height: 1.6;
}
.article-content code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.875em;
}
.article-content :not(pre) > code {
  background: #f3f4f6;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: #374151;
}
.article-content img {
  border-radius: 10px;
  margin: 1.5rem 0;
}
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
}
.article-content th, .article-content td {
  padding: 0.75rem 1rem;
  border: 1px solid #f0f0f5;
  text-align: left;
  font-size: 0.875rem;
}
.article-content th {
  background: #fafafa;
  font-weight: 600;
  color: #111827;
}
.article-content hr {
  border: none;
  border-top: 1px solid #f0f0f5;
  margin: 2rem 0;
}
