/* ===================== TOKENS ===================== */
:root, [data-theme="light"] {
  --color-bg: #f4f6f8;
  --color-surface: #ffffff;
  --color-surface-2: #f9fafb;
  --color-surface-offset: #eef1f5;
  --color-border: #e2e6ec;
  --color-divider: #dde2e8;
  --color-text: #0f1923;
  --color-text-muted: #5a6478;
  --color-text-faint: #9ba5b5;
  --color-text-inverse: #ffffff;
  --color-primary: #1a7cff;
  --color-primary-hover: #1264d4;
  --color-primary-active: #0d50ab;
  --color-primary-highlight: #dbeaff;
  --color-success: #22a05b;
  --color-success-highlight: #d4f0e3;
  --color-warning: #d97706;
  --color-error: #dc2626;
  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(15,25,35,0.07), 0 1px 2px rgba(15,25,35,0.04);
  --shadow-md: 0 4px 16px rgba(15,25,35,0.09), 0 2px 6px rgba(15,25,35,0.05);
  --shadow-lg: 0 16px 40px rgba(15,25,35,0.12), 0 4px 12px rgba(15,25,35,0.07);
  --transition: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --font-display: 'Raleway', 'Arial Black', sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', sans-serif;
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.25rem);
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;
  --space-12: 3rem; --space-16: 4rem; --space-20: 5rem;
  --content-default: 1100px;
}
[data-theme="dark"] {
  --color-bg: #0d1117;
  --color-surface: #161b22;
  --color-surface-2: #1c2230;
  --color-surface-offset: #1a2030;
  --color-border: #2a3347;
  --color-divider: #243040;
  --color-text: #e4eaf4;
  --color-text-muted: #7c8fa8;
  --color-text-faint: #4a5568;
  --color-text-inverse: #0d1117;
  --color-primary: #4fa3ff;
  --color-primary-hover: #2d8fff;
  --color-primary-active: #1a7cff;
  --color-primary-highlight: #1a2d45;
  --color-success: #34d27a;
  --color-success-highlight: #1a3328;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 16px 40px rgba(0,0,0,0.5);
}

/* ===================== BASE ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; scroll-padding-top: 80px; }
body { font-family: var(--font-body); font-size: var(--text-base); color: var(--color-text); background: var(--color-bg); line-height: 1.65; min-height: 100dvh; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-hover); }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
ul { list-style: none; }
h1,h2,h3,h4 { text-wrap: balance; line-height: 1.2; }
p { text-wrap: pretty; }
.container { max-width: var(--content-default); margin-inline: auto; padding-inline: var(--space-6); }
.divider { border: none; border-top: 1px solid var(--color-divider); }

/* ===================== BUTTONS ===================== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); font-size: var(--text-sm); font-weight: 600; border-radius: var(--radius-md); padding: 0.5rem 1.125rem; transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition); white-space: nowrap; cursor: pointer; text-decoration: none; }
.btn:active { transform: scale(0.98); }
.btn-ghost { color: var(--color-text-muted); }
.btn-ghost:hover { color: var(--color-text); background: var(--color-surface-offset); }
.btn-primary { background: var(--color-primary); color: #fff; box-shadow: 0 2px 8px rgba(26,124,255,0.25); }
.btn-primary:hover { background: var(--color-primary-hover); box-shadow: 0 4px 16px rgba(26,124,255,0.35); color: #fff; }
.btn-outline { border: 1.5px solid var(--color-border); color: var(--color-text); background: var(--color-surface); }
.btn-outline:hover { border-color: var(--color-primary); color: var(--color-primary); background: var(--color-primary-highlight); }
.btn-white { background: #fff; color: var(--color-primary); font-weight: 700; }
.btn-white:hover { background: #f0f7ff; color: var(--color-primary-hover); }
.btn-lg { padding: 0.75rem 1.75rem; font-size: var(--text-base); border-radius: var(--radius-lg); }
.btn-block { width: 100%; padding: 0.75rem; border-radius: var(--radius-lg); }

/* ===================== HEADER ===================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition);
}
[data-theme="dark"] .site-header { background: rgba(13,17,23,0.88); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: var(--space-6); }
.site-logo { display: flex; align-items: center; gap: var(--space-3); text-decoration: none; }
.site-logo svg { width: 36px; height: 36px; flex-shrink: 0; }
.logo-text { font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; color: var(--color-text); letter-spacing: -0.01em; }
.logo-text span { color: var(--color-primary); }
.main-nav { display: flex; align-items: center; gap: var(--space-1); }
.main-nav a { font-size: var(--text-sm); font-weight: 500; color: var(--color-text-muted); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); transition: color var(--transition), background var(--transition); }
.main-nav a:hover, .main-nav a.current-menu-item { color: var(--color-text); background: var(--color-surface-offset); }
.header-actions { display: flex; align-items: center; gap: var(--space-3); }
.theme-toggle { width: 36px; height: 36px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; color: var(--color-text-muted); transition: background var(--transition), color var(--transition); }
.theme-toggle:hover { background: var(--color-surface-offset); color: var(--color-text); }
.mobile-menu-btn { display: none; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: var(--radius-md); color: var(--color-text-muted); }
.mobile-menu-btn:hover { background: var(--color-surface-offset); color: var(--color-text); }

/* Mobile nav */
.mobile-nav { display: none; background: var(--color-surface); border-top: 1px solid var(--color-border); padding: var(--space-4) var(--space-6); flex-direction: column; gap: var(--space-1); }
.mobile-nav.open { display: flex; }
.mobile-nav a { font-size: var(--text-base); font-weight: 500; color: var(--color-text-muted); padding: var(--space-3) var(--space-2); border-radius: var(--radius-md); transition: color var(--transition), background var(--transition); }
.mobile-nav a:hover { color: var(--color-text); background: var(--color-surface-offset); }
.mobile-nav .mobile-nav-divider { border: none; border-top: 1px solid var(--color-divider); margin: var(--space-2) 0; }
.mobile-nav .btn { justify-content: center; }

/* ===================== SECTION SHARED ===================== */
.section { padding: clamp(var(--space-12), 6vw, var(--space-20)) 0; }
.section-label { font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-primary); margin-bottom: var(--space-3); }
.section-title { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 800; color: var(--color-text); letter-spacing: -0.02em; margin-bottom: var(--space-4); }
.section-sub { font-size: var(--text-base); color: var(--color-text-muted); max-width: 560px; line-height: 1.7; }
.section-head { margin-bottom: var(--space-12); }
.section-head.centered { text-align: center; }
.section-head.centered .section-sub { margin: 0 auto; }

/* ===================== HERO ===================== */
.hero { padding: clamp(var(--space-16), 8vw, var(--space-20)) 0 clamp(var(--space-12), 6vw, var(--space-16)); position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; background: radial-gradient(ellipse 80% 60% at 60% -10%, rgba(26,124,255,0.08) 0%, transparent 70%), radial-gradient(ellipse 50% 40% at 10% 80%, rgba(26,124,255,0.05) 0%, transparent 60%); }
[data-theme="dark"] .hero-bg { background: radial-gradient(ellipse 80% 60% at 60% -10%, rgba(79,163,255,0.12) 0%, transparent 70%), radial-gradient(ellipse 50% 40% at 10% 80%, rgba(79,163,255,0.07) 0%, transparent 60%); }
.hero-inner { position: relative; z-index: 1; text-align: center; max-width: 820px; margin: 0 auto; }
.hero-badge { display: inline-flex; align-items: center; gap: var(--space-2); background: var(--color-primary-highlight); color: var(--color-primary); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; padding: var(--space-2) var(--space-4); border-radius: var(--radius-full); margin-bottom: var(--space-6); border: 1px solid rgba(26,124,255,0.18); }
.hero-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--color-primary); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.6;transform:scale(0.8)} }
.hero h1 { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 800; letter-spacing: -0.02em; color: var(--color-text); margin-bottom: var(--space-6); line-height: 1.12; }
.hero h1 em { font-style: normal; color: var(--color-primary); }
.hero-sub { font-size: var(--text-lg); color: var(--color-text-muted); max-width: 620px; margin: 0 auto var(--space-10); line-height: 1.65; }
.hero-actions { display: flex; align-items: center; justify-content: center; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-10); }
.hero-stats { display: flex; align-items: center; justify-content: center; gap: var(--space-8); flex-wrap: wrap; }
.hero-stat { text-align: center; }
.hero-stat-num { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 800; color: var(--color-text); line-height: 1; }
.hero-stat-label { font-size: var(--text-xs); color: var(--color-text-muted); margin-top: var(--space-1); }
.stat-divider { width: 1px; height: 40px; background: var(--color-divider); }

/* ===================== TOOLS GRID ===================== */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: var(--space-5); }
.tool-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-xl); padding: var(--space-8); transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition); }
.tool-card:hover { box-shadow: var(--shadow-md); border-color: rgba(26,124,255,0.3); transform: translateY(-2px); }
.tool-card-badge { display: inline-block; font-size: var(--text-xs); font-weight: 600; padding: 0.2rem 0.625rem; border-radius: var(--radius-full); margin-bottom: var(--space-4); }
.badge-new { background: var(--color-primary-highlight); color: var(--color-primary); }
.badge-hot { background: #fff0e6; color: #d97706; }
[data-theme="dark"] .badge-hot { background: #2a1f10; color: #f59e0b; }
.badge-base { background: var(--color-surface-offset); color: var(--color-text-muted); }
.tool-icon { width: 48px; height: 48px; border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-4); background: var(--color-surface-offset); }
.tool-icon svg { width: 24px; height: 24px; color: var(--color-primary); }
.tool-card h3 { font-size: var(--text-base); font-weight: 700; color: var(--color-text); margin-bottom: var(--space-2); }
.tool-card p { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.65; margin-bottom: var(--space-5); }
.tool-link { font-size: var(--text-sm); font-weight: 600; color: var(--color-primary); display: inline-flex; align-items: center; gap: var(--space-1); transition: gap var(--transition); }
.tool-link:hover { gap: var(--space-2); }
.tool-link svg { width: 14px; height: 14px; transition: transform var(--transition); }
.tool-link:hover svg { transform: translateX(3px); }

/* ===================== HOW IT WORKS ===================== */
.how-bg { background: var(--color-surface); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-8); position: relative; }
.steps::before { content:''; position:absolute; top:28px; left:10%; right:10%; height:1px; background: linear-gradient(90deg, transparent, var(--color-border), transparent); }
.step { text-align: center; position: relative; z-index: 1; }
.step-num { width: 56px; height: 56px; border-radius: var(--radius-full); background: var(--color-primary); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: var(--text-lg); display: flex; align-items: center; justify-content: center; margin: 0 auto var(--space-5); box-shadow: 0 4px 16px rgba(26,124,255,0.3); }
.step h3 { font-size: var(--text-base); font-weight: 700; margin-bottom: var(--space-2); }
.step p { font-size: var(--text-sm); color: var(--color-text-muted); }

/* ===================== AUDIENCE ===================== */
.audience-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--space-4); }
.audience-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-6); transition: box-shadow var(--transition), border-color var(--transition); }
.audience-card:hover { box-shadow: var(--shadow-sm); border-color: var(--color-primary); }
.audience-emoji { font-size: 2rem; margin-bottom: var(--space-3); }
.audience-card h3 { font-size: var(--text-base); font-weight: 700; margin-bottom: var(--space-2); }
.audience-card p { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.6; }

/* ===================== PRICING ===================== */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-6); align-items: start; }
.pricing-card { background: var(--color-surface); border: 1.5px solid var(--color-border); border-radius: var(--radius-xl); padding: var(--space-8); transition: box-shadow var(--transition); }
.pricing-card.popular { border-color: var(--color-primary); box-shadow: 0 0 0 4px rgba(26,124,255,0.08), var(--shadow-md); position: relative; }
.popular-badge { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--color-primary); color: #fff; font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 0.25rem 0.875rem; border-radius: var(--radius-full); white-space: nowrap; }
.pricing-name { font-size: var(--text-sm); font-weight: 700; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--space-3); }
.pricing-price { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 800; color: var(--color-text); margin-bottom: var(--space-2); line-height: 1; }
.pricing-price span { font-size: var(--text-sm); font-weight: 500; color: var(--color-text-muted); font-family: var(--font-body); }
.pricing-desc { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-6); line-height: 1.6; }
.pricing-features { margin-bottom: var(--space-8); }
.pricing-features li { display: flex; align-items: flex-start; gap: var(--space-3); font-size: var(--text-sm); color: var(--color-text-muted); padding: var(--space-2) 0; border-bottom: 1px solid var(--color-divider); }
.pricing-features li:last-child { border-bottom: none; }
.pricing-features li svg { width: 16px; height: 16px; color: var(--color-success); flex-shrink: 0; margin-top: 2px; }
.pricing-features .no svg { color: var(--color-text-faint); }
.pricing-features .no span { color: var(--color-text-faint); }
.pricing-features li strong { color: var(--color-text); }

/* ===================== FAQ ===================== */
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--color-divider); }
.faq-q { width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); padding: var(--space-5) 0; font-size: var(--text-base); font-weight: 600; color: var(--color-text); background: none; transition: color var(--transition); }
.faq-q:hover { color: var(--color-primary); }
.faq-q svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--color-text-faint); transition: transform var(--transition); }
.faq-item.open .faq-q svg { transform: rotate(180deg); color: var(--color-primary); }
.faq-a { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.75; max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; }
.faq-item.open .faq-a { max-height: 300px; padding-bottom: var(--space-5); }

/* ===================== CTA BANNER ===================== */
.cta-banner { background: linear-gradient(135deg, var(--color-primary) 0%, #0d50ab 100%); border-radius: var(--radius-xl); padding: clamp(var(--space-10), 5vw, var(--space-16)); text-align: center; color: #fff; margin-bottom: var(--space-20); box-shadow: 0 8px 32px rgba(26,124,255,0.35); }
.cta-banner h2 { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 800; margin-bottom: var(--space-4); }
.cta-banner p { font-size: var(--text-base); opacity: 0.85; max-width: 520px; margin: 0 auto var(--space-8); }

/* ===================== TOOL PAGE ===================== */
.tool-page { padding: clamp(var(--space-10), 5vw, var(--space-16)) 0; }
.tool-page-header { margin-bottom: var(--space-10); }
.tool-page-header h1 { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 800; letter-spacing: -0.02em; margin-bottom: var(--space-3); }
.tool-page-header p { font-size: var(--text-base); color: var(--color-text-muted); max-width: 600px; }
.tool-container { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-xl); padding: var(--space-8); box-shadow: var(--shadow-sm); }
.tool-app { min-height: 400px; }

/* ===================== BLOG ===================== */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-6); }
.post-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-xl); overflow: hidden; transition: box-shadow var(--transition), transform var(--transition); }
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.post-card-img { aspect-ratio: 16/9; background: var(--color-surface-offset); overflow: hidden; }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: var(--space-6); }
.post-card-cat { font-size: var(--text-xs); font-weight: 700; color: var(--color-primary); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--space-3); }
.post-card h2 { font-size: var(--text-base); font-weight: 700; margin-bottom: var(--space-3); line-height: 1.4; }
.post-card h2 a { color: var(--color-text); }
.post-card h2 a:hover { color: var(--color-primary); }
.post-card p { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.65; }
.post-meta { font-size: var(--text-xs); color: var(--color-text-faint); margin-top: var(--space-4); }

/* ===================== SINGLE POST ===================== */
.post-content { max-width: 720px; margin: 0 auto; }
.post-content h2 { font-family: var(--font-display); font-size: var(--text-lg); font-weight: 700; margin: var(--space-10) 0 var(--space-4); }
.post-content h3 { font-size: var(--text-base); font-weight: 700; margin: var(--space-8) 0 var(--space-3); }
.post-content p { margin-bottom: var(--space-5); color: var(--color-text); line-height: 1.8; }
.post-content ul, .post-content ol { padding-left: var(--space-6); margin-bottom: var(--space-5); }
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li { margin-bottom: var(--space-2); line-height: 1.7; }
.post-content img { border-radius: var(--radius-lg); margin: var(--space-8) 0; }
.post-content blockquote { border-left: 3px solid var(--color-primary); padding-left: var(--space-6); color: var(--color-text-muted); font-style: italic; margin: var(--space-8) 0; }
.post-content code { font-size: 0.9em; background: var(--color-surface-offset); padding: 0.15em 0.4em; border-radius: var(--radius-sm); font-family: 'Courier New', monospace; }
.post-content pre { background: var(--color-surface-offset); border-radius: var(--radius-lg); padding: var(--space-6); overflow-x: auto; margin: var(--space-6) 0; }
.post-content pre code { background: none; padding: 0; }

/* ===================== FOOTER ===================== */
.site-footer { background: var(--color-surface); border-top: 1px solid var(--color-divider); padding: var(--space-12) 0 var(--space-8); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--space-10); margin-bottom: var(--space-10); }
.footer-brand p { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: var(--space-4); max-width: 260px; line-height: 1.7; }
.footer-col h4 { font-size: var(--text-sm); font-weight: 700; color: var(--color-text); margin-bottom: var(--space-4); }
.footer-col ul li { margin-bottom: var(--space-2); }
.footer-col ul li a { font-size: var(--text-sm); color: var(--color-text-muted); transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--color-primary); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding-top: var(--space-6); border-top: 1px solid var(--color-divider); flex-wrap: wrap; }
.footer-bottom p { font-size: var(--text-xs); color: var(--color-text-faint); }
.footer-legal { display: flex; gap: var(--space-5); }
.footer-legal a { font-size: var(--text-xs); color: var(--color-text-faint); }
.footer-legal a:hover { color: var(--color-text-muted); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .main-nav { display: none; }
  .mobile-menu-btn { display: flex; }
  .steps::before { display: none; }
  .hero-stats { gap: var(--space-6); }
  .stat-divider { display: none; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .header-actions .btn-ghost { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}