/* ── Variables & Reset ── */
:root {
  --bg-dark: #09090e;
  --bg-panel: rgba(255, 255, 255, 0.03);
  --bg-panel-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(255, 255, 255, 0.15);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --blue: #3b82f6;
  --blue-hover: #2563eb;
  --purple: #8b5cf6;
  --emerald: #10b981;
  --red: #ef4444;
  --yellow: #eab308;
  --amber: #f59e0b;
  
  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --glass-blur: blur(12px);
  --shadow-glow: 0 0 40px rgba(59, 130, 246, 0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-pad { padding: 100px 0; }
.bg-alternate { background: rgba(255, 255, 255, 0.015); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.text-center { text-align: center; }
.mb-4 { margin-bottom: 24px; } .mb-5 { margin-bottom: 40px; }
.mt-3 { margin-top: 16px; } .mt-4 { margin-top: 24px; } .mt-5 { margin-top: 40px; } .mt-auto { margin-top: auto; }
.w-100 { width: 100%; }

/* Utilities */
.text-green { color: var(--emerald); }
.text-blue { color: var(--blue); }
.text-muted { color: var(--text-muted); }
.bg-blue { background: rgba(59, 130, 246, 0.15); color: var(--blue); }
.bg-purple { background: rgba(139, 92, 246, 0.15); color: var(--purple); }
.bg-emerald { background: rgba(16, 185, 129, 0.15); color: var(--emerald); }
.bg-red { background: var(--red); } .bg-yellow { background: var(--yellow); } .bg-green { background: var(--emerald); }

.glass-panel {
  background: var(--bg-panel);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: 16px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: 8px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: var(--transition); border: 1px solid transparent;
}
.btn-sm { padding: 10px 16px; font-size: 13px; }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3); }
.btn-primary:hover { background: var(--blue-hover); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4); }
.btn-secondary { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: var(--border-highlight); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.15); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text-primary); }
.btn-outline:hover { border-color: var(--border-highlight); background: rgba(255, 255, 255, 0.05); }
.btn-text { background: transparent; color: var(--blue); font-weight: 500; }
.btn-text:hover { color: #60a5fa; text-decoration: underline; }

/* ── Navbar ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; height: 64px;
  background: rgba(9, 9, 14, 0.85); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border); z-index: 1000;
}
.nav-inner { display: flex; justify-content: space-between; align-items: center; height: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.nav-brand { display: flex; align-items: center; gap: 10px; }
.brand-logo-img { width: 24px; height: 24px; border-radius: 4px; object-fit: contain; display: block; }
.brand-name { font-weight: 800; font-size: 18px; font-family: var(--font-heading); }
.brand-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; background: rgba(255, 255, 255, 0.1); padding: 2px 6px; border-radius: 4px; letter-spacing: 0.5px; }

.nav-menu { display: flex; gap: 24px; align-items: center; }
.nav-item { color: var(--text-secondary); font-size: 14px; font-weight: 500; display: flex; align-items: center; position: relative; }
.nav-item:hover { color: var(--text-primary); }
.nav-item .chevron { width: 14px; height: 14px; margin-left: 4px; stroke: currentColor; fill: none; stroke-width: 2; transition: var(--transition); }

.has-dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.has-dropdown:hover .chevron { transform: rotate(180deg); }
.dropdown-menu {
  position: absolute; top: 100%; left: 0; margin-top: 16px;
  background: #11111a; border: 1px solid var(--border); border-radius: 8px;
  padding: 8px; width: 200px; opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: var(--transition); box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.dropdown-menu a { display: block; padding: 10px 12px; font-size: 13px; color: var(--text-secondary); border-radius: 6px; }
.dropdown-menu a:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }

.nav-actions { display: flex; align-items: center; }
.btn-pro-login {
  display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600;
  color: var(--text-primary); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border);
  padding: 8px 16px; border-radius: 6px; transition: var(--transition);
}
.btn-pro-login:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--border-highlight); }
.btn-pro-login svg { width: 14px; height: 14px; }
.mobile-menu-btn { display: none; background: none; border: none; color: var(--text-primary); cursor: pointer; }
.mobile-menu-btn svg { width: 24px; height: 24px; }

/* ── Hero ── */
.hero { padding: 140px 0 80px; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; top: -10%; left: 10%; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 60%); z-index: -1;
}
.hero::after {
  content: ''; position: absolute; top: 20%; right: 10%; width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 60%); z-index: -1;
}
.hero-container { display: flex; align-items: center; gap: 60px; }
.hero-content { flex: 1; }
.hero-badge {
  display: inline-block; padding: 6px 12px; font-size: 12px; font-weight: 600; font-family: var(--font-mono);
  color: var(--emerald); background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 20px; margin-bottom: 24px; letter-spacing: 0.5px;
}
.hero-title { font-size: 52px; font-weight: 800; letter-spacing: -1px; margin-bottom: 24px; }
.gradient-text { background: linear-gradient(135deg, #60a5fa, #c084fc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-desc { font-size: 16px; color: var(--text-secondary); margin-bottom: 40px; max-width: 540px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-visual { flex: 1; display: flex; justify-content: flex-end; perspective: 1000px; }
.proof-card-preview {
  width: 100%; max-width: 480px; background: rgba(10, 10, 15, 0.8); backdrop-filter: blur(20px);
  border: 1px solid var(--border-highlight); border-radius: 16px; padding: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), var(--shadow-glow);
  transform: rotateY(-5deg) rotateX(5deg); transition: transform 0.5s ease;
}
.proof-card-preview:hover { transform: rotateY(0) rotateX(0); }
.proof-header { display: flex; align-items: center; gap: 10px; font-size: 13px; font-family: var(--font-mono); border-bottom: 1px solid var(--border); padding-bottom: 16px; margin-bottom: 16px; }
.proof-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 10px var(--emerald); }
.proof-json { font-family: var(--font-mono); font-size: 12px; color: #a5b4fc; background: rgba(0,0,0,0.3); padding: 16px; border-radius: 8px; overflow-x: auto; margin-bottom: 16px; }
.proof-footer { display: flex; justify-content: space-between; font-size: 12px; font-family: var(--font-sans); }
.pf-item { display: flex; flex-direction: column; gap: 4px; }
.pf-item span { color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Product Cards ── */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.product-card { padding: 32px; display: flex; flex-direction: column; transition: var(--transition); }
.product-card:hover { transform: translateY(-5px); border-color: var(--border-highlight); background: var(--bg-panel-hover); }
.p-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 24px; }
.p-icon svg { width: 24px; height: 24px; }
.product-card h3 { font-size: 20px; margin-bottom: 4px; }
.cn-title { font-size: 13px; color: var(--blue); font-weight: 500; display: block; margin-bottom: 16px; }
.product-card p { font-size: 14px; color: var(--text-secondary); margin-bottom: 12px; }
.cn-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }
.target-users { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.target-users span { font-size: 11px; padding: 4px 10px; background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 20px; color: var(--text-secondary); }

/* ── Workflow ── */
.section-header h2 { font-size: 32px; margin-bottom: 8px; }
.section-header p { color: var(--text-secondary); font-size: 15px; }
.workflow-steps { display: flex; align-items: flex-start; justify-content: space-between; margin-top: 60px; gap: 16px; }
.step-card { flex: 1; text-align: center; position: relative; }
.step-num { width: 32px; height: 32px; background: var(--blue); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--font-mono); margin: 0 auto 16px; box-shadow: 0 0 15px rgba(59, 130, 246, 0.4); }
.step-card h4 { font-size: 16px; margin-bottom: 4px; }
.cn-sub { display: block; font-size: 12px; color: var(--blue); margin-bottom: 12px; }
.step-card p { font-size: 13px; color: var(--text-secondary); }
.step-arrow { display: flex; align-items: center; justify-content: center; height: 60px; color: var(--border-highlight); flex-shrink: 0; }
.step-arrow svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ── Module Detail (Row) ── */
.flex-row { display: flex; align-items: center; gap: 60px; }
.row-reverse { flex-direction: row-reverse; }
.module-text { flex: 1; }
.module-text h2 { font-size: 32px; margin-bottom: 8px; }
.cn-subtitle { font-size: 15px; color: var(--blue); margin-bottom: 32px; font-weight: 500; }
.feature-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.fl-item { display: flex; align-items: flex-start; gap: 12px; }
.fl-item svg { width: 20px; height: 20px; fill: none; stroke-width: 2; flex-shrink: 0; margin-top: 2px; }
.fl-item div { font-size: 14px; color: var(--text-secondary); }
.fl-item strong { color: var(--text-primary); font-weight: 600; }
.supported-types { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { font-size: 12px; font-family: var(--font-mono); background: rgba(255,255,255,0.05); border: 1px solid var(--border); padding: 4px 10px; border-radius: 6px; }

.module-visual { flex: 1; border-radius: 16px; padding: 2px; background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0)); box-shadow: var(--shadow-glow); }
.code-window { background: #0f0f17; border-radius: 14px; overflow: hidden; height: 100%; }
.cw-header { display: flex; align-items: center; gap: 6px; padding: 12px 16px; background: rgba(255,255,255,0.02); border-bottom: 1px solid var(--border); }
.cw-dot { width: 10px; height: 10px; border-radius: 50%; }
.cw-title { margin-left: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.code-window pre { padding: 24px; font-family: var(--font-mono); font-size: 13px; color: #a5b4fc; overflow-x: auto; line-height: 1.5; }

/* ── Fair Random ── */
.flex-center { display: flex; flex-direction: column; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; width: 100%; max-width: 800px; margin: 0 auto; }
.mini-card { background: var(--bg-panel); border: 1px solid var(--border); padding: 24px; border-radius: 12px; text-align: center; }
.mc-icon { font-size: 32px; margin-bottom: 16px; }
.mini-card h4 { font-size: 16px; margin-bottom: 8px; }
.mini-card p { font-size: 13px; color: var(--text-secondary); }
.workflow-inline { display: flex; align-items: center; justify-content: center; gap: 16px; font-family: var(--font-mono); font-size: 13px; color: var(--text-secondary); background: rgba(255,255,255,0.03); padding: 16px 32px; border-radius: 30px; border: 1px solid var(--border); }
.workflow-inline span { color: var(--text-primary); }

/* ── Entropy Trust Module ── */
.node-status-card { background: #11111a; border: 1px solid var(--border-highlight); border-radius: 12px; padding: 24px; }
.node-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.nh-title { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 14px; }
.live-indicator { width: 8px; height: 8px; background: var(--emerald); border-radius: 50%; box-shadow: 0 0 8px var(--emerald); animation: pulse 2s infinite; }
.status-badge.pass { background: rgba(16,185,129,0.1); color: var(--emerald); border: 1px solid rgba(16,185,129,0.2); padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.node-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ns-item { display: flex; flex-direction: column; gap: 4px; }
.ns-item span { font-size: 11px; color: var(--text-muted); text-transform: uppercase; }
.ns-item strong { font-family: var(--font-mono); font-size: 13px; }
.desc-text { color: var(--text-secondary); font-size: 15px; }
.check-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.check-list li { position: relative; padding-left: 24px; font-size: 14px; color: var(--text-secondary); }
.check-list li::before { content: '✓'; position: absolute; left: 0; color: var(--emerald); font-weight: bold; }
.flex-gap { display: flex; gap: 16px; align-items: center; }

/* ── Verify Module ── */
.verify-box { max-width: 600px; margin: 0 auto; background: var(--bg-panel); border: 1px solid var(--border); border-radius: 16px; padding: 40px; text-align: center; }
.verify-inputs { display: flex; flex-direction: row; gap: 12px; align-items: center; width: 100%; }
.verify-inputs .form-control { flex: 1; width: auto; }
.verify-inputs .btn { white-space: nowrap; flex-shrink: 0; align-self: stretch; }
.form-control { width: 100%; background: #0f0f17; border: 1px solid var(--border); padding: 14px 16px; border-radius: 8px; color: var(--text-primary); font-family: var(--font-mono); font-size: 14px; transition: var(--transition); }
.form-control:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 2px rgba(59,130,246,0.2); }
.tool-action-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
}
.tool-action-row .btn {
  flex: 1 1 360px;
  min-height: 56px;
  width: auto !important;
}
.tool-turnstile-compact {
  flex: 0 0 248px;
  height: 54px;
  justify-content: flex-start;
  overflow: hidden;
}
.tool-turnstile-compact > div {
  transform: scale(0.82);
  transform-origin: left top;
  width: 305px;
  height: 70px;
}
.verify-inputs span { font-size: 12px; color: var(--text-muted); font-weight: 600; white-space: nowrap; flex-shrink: 0; }
@media (max-width: 576px) {
  .verify-inputs { flex-direction: column; gap: 12px; }
  .verify-inputs .form-control { width: 100%; }
  .verify-inputs .btn { width: 100%; }
}
.verify-checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; text-align: left; }
.vc-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); }
.vc-item svg { width: 16px; height: 16px; stroke: var(--emerald); fill: none; stroke-width: 2; }

/* ── Pricing ── */
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; max-width: 800px; margin: 0 auto; }
.price-card { padding: 40px; border-radius: 16px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.price-card.pro { border-color: var(--border-highlight); background: rgba(255,255,255,0.05); }
.card-badge { position: absolute; top: 0; right: 0; background: var(--blue); color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 6px 16px; border-bottom-left-radius: 12px; }
.price-card h3 { font-size: 24px; margin-bottom: 4px; }
.price { font-size: 36px; font-weight: 800; margin-top: 16px; font-family: var(--font-heading); }
.price-features { list-style: none; margin-bottom: 32px; flex: 1; }
.price-features li { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 14px; color: var(--text-secondary); display: flex; align-items: center; gap: 10px; }
.price-features li::before { content: '✓'; color: var(--emerald); font-weight: bold; }
.price-features li strong { color: var(--text-primary); }

/* ── Footer ── */
.site-footer { padding: 80px 0 40px; background: #05050a; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-links h4 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-primary); margin-bottom: 20px; }
.footer-links a { display: block; color: var(--text-secondary); font-size: 14px; margin-bottom: 12px; transition: var(--transition); }
.footer-links a:hover { color: var(--blue); }
.highlight-link { color: var(--purple) !important; font-weight: 500; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-muted); }

/* Animations */
@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Responsive */
@media (max-width: 992px) {
  .hero-container, .flex-row { flex-direction: column; text-align: center; gap: 40px; }
  .product-grid { grid-template-columns: 1fr; }
  .workflow-steps { flex-direction: column; align-items: center; gap: 32px; }
  .step-arrow { transform: rotate(90deg); height: 30px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .module-text { text-align: center; }
  .feature-list { align-items: center; text-align: left; }
  .supported-types { justify-content: center; }
  .verify-checklist { grid-template-columns: 1fr; justify-content: center; }
  .hero-visual { width: 100%; justify-content: center; }
}

@media (max-width: 768px) {
  .nav-menu, .nav-actions { display: none; }
  .nav-menu.mobile-open,
  .nav-actions.mobile-open {
    display: flex;
    position: absolute;
    left: 20px;
    right: 20px;
    background: #0a0a12;
    border: 1px solid var(--border);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255,255,255,0.03);
    backdrop-filter: blur(18px);
    z-index: 1001;
  }
  .nav-menu.mobile-open {
    top: 64px;
    flex-direction: column;
    gap: 4px;
    align-items: stretch;
    padding: 12px;
    border-radius: 12px 12px 0 0;
    border-bottom: none;
  }
  .nav-menu.mobile-open .nav-item {
    padding: 10px 12px;
  }
  .nav-actions.mobile-open {
    top: var(--mobile-actions-top, 254px);
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border-radius: 0 0 12px 12px;
    border-top: none;
  }
  .nav-actions.mobile-open .btn {
    justify-content: center;
    width: 100%;
  }
  .mobile-menu-btn { display: block; }
  .hero-title { font-size: 36px; }
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .workflow-inline { flex-direction: column; gap: 8px; text-align: center; }
}


/* Language Toggle */
body.lang-en .cn-title,
body.lang-en .cn-desc,
body.lang-en .cn-subtitle,
body.lang-en .cn-sub {
  display: none !important;
}
/* Mobile layout polish */
@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }

  .navbar {
    height: 64px;
  }

  .hero {
    padding: 96px 0 56px;
  }

  .hero-title {
    font-size: 34px;
    line-height: 1.18;
    letter-spacing: 0;
  }

  .hero-desc {
    font-size: 15px;
    margin-bottom: 28px;
  }

  .hero-cta {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-cta .btn {
    justify-content: center;
    width: 100%;
  }

  .tool-action-row {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .tool-action-row .btn {
    flex-basis: auto;
    width: 100% !important;
  }

  .tool-turnstile-compact {
    flex-basis: 54px;
    max-width: 100%;
  }

  .module-text h2 {
    font-size: 28px;
    line-height: 1.2;
  }

  .feature-list {
    align-items: stretch;
  }

  .supported-types {
    justify-content: center;
  }

  .module-visual {
    width: 100%;
  }

  .code-window pre {
    font-size: 12px;
    padding: 18px;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .node-header,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .verify-box,
  .price-card {
    padding: 28px 20px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 30px;
  }

  .hero-badge {
    max-width: 100%;
  }

  .node-stats,
  .verify-checklist {
    grid-template-columns: 1fr;
  }

  .workflow-inline {
    border-radius: 16px;
    padding: 16px;
  }
}
