/* ─── Zeditor Demo Site ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --accent: #7c3aed;
  --text: #0f172a;
  --text-muted: #64748b;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -1px rgba(0,0,0,.05);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);
}

html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif; color: var(--text); background: var(--bg); line-height: 1.6; }

/* ─── Nav ─────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 800;
  font-size: 22px;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.nav-logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  font-size: 18px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  padding: 7px 14px;
  border-radius: 7px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: background .12s, color .12s;
}

.nav-links a:hover { background: var(--bg-alt); color: var(--text); }
.nav-links a.active { background: var(--primary-light); color: var(--primary); }

.nav-cta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all .15s;
  border: none;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37,99,235,.3); }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg-alt); color: var(--text); }
.btn-lg { padding: 13px 28px; font-size: 16px; border-radius: 10px; }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* ─── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  padding: 80px 24px 60px;
  text-align: center;
  background: linear-gradient(160deg, #f0f9ff 0%, #ffffff 50%, #faf5ff 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(37,99,235,.06) 0%, transparent 70%);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(124,58,237,.06) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-inner { max-width: 860px; margin: 0 auto; position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-badge::before { content: '★'; }

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 20px;
  color: var(--text);
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-actions { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }

.hero-note { font-size: 13px; color: var(--text-muted); }
.hero-note a { color: var(--primary); }

/* ─── Install strip ───────────────────────────────────────────────────────── */
.install-strip {
  background: var(--text);
  color: white;
  padding: 20px 24px;
}

.install-strip-inner {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.install-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.install-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #94a3b8;
  width: 36px;
  flex-shrink: 0;
}

.install-code {
  flex: 1;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 7px;
  padding: 8px 14px;
  font-family: 'Fira Code', monospace;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background .12s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #e2e8f0;
}

.install-code:hover { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.2); }
.install-code .copy-icon { opacity: .5; font-size: 13px; flex-shrink: 0; }

/* ─── Features section ───────────────────────────────────────────────────── */
.section { padding: 80px 24px; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-alt { background: var(--bg-alt); }

.section-header { text-align: center; margin-bottom: 52px; }
.section-header h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 800; margin-bottom: 12px; letter-spacing: -0.5px; }
.section-header p { font-size: 17px; color: var(--text-muted); max-width: 560px; margin: 0 auto; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: box-shadow .15s, transform .15s;
}

.feature-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
}

.feature-icon.blue { background: #dbeafe; }
.feature-icon.purple { background: #ede9fe; }
.feature-icon.green { background: #dcfce7; }
.feature-icon.orange { background: #ffedd5; }
.feature-icon.pink { background: #fce7f3; }
.feature-icon.yellow { background: #fef9c3; }

.feature-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.feature-card p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.feature-badge { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: #dcfce7; color: #16a34a; margin-left: 6px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ─── Comparison table ───────────────────────────────────────────────────── */
.comparison-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.comparison-table th { padding: 14px 16px; text-align: center; font-weight: 700; background: var(--bg-alt); }
.comparison-table th:first-child { text-align: left; }
.comparison-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); text-align: center; }
.comparison-table td:first-child { text-align: left; font-weight: 500; }
.comparison-table tr:hover td { background: rgba(37,99,235,.02); }
.comparison-table .th-ze { background: linear-gradient(135deg, var(--primary), var(--accent)); color: white; border-radius: 8px 8px 0 0; }
.check { color: #16a34a; font-weight: 700; }
.cross { color: #dc2626; }
.paid { color: #ca8a04; font-size: 12px; }

/* ─── Install section ─────────────────────────────────────────────────────── */
.install-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.install-tab-btn {
  padding: 8px 18px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color .12s;
  margin-bottom: -1px;
}

.install-tab-btn.active { border-bottom-color: var(--primary); color: var(--primary); }
.install-panel { display: none; }
.install-panel.active { display: block; }

.code-block {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 20px 24px;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.7;
  overflow-x: auto;
  position: relative;
  white-space: pre;
}

.code-block .comment { color: #64748b; }
.code-block .tag { color: #7dd3fc; }
.code-block .attr { color: #86efac; }
.code-block .val { color: #fcd34d; }
.code-block .kw { color: #c084fc; }
.code-block .fn { color: #60a5fa; }
.code-block .str { color: #fca5a5; }

.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,.1);
  border: none;
  color: #94a3b8;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: background .12s;
}

.copy-btn:hover { background: rgba(255,255,255,.2); color: white; }

/* ─── Demo area ──────────────────────────────────────────────────────────── */
.demo-area { max-width: 900px; margin: 0 auto; }
.demo-area #editor-demo { border-radius: var(--radius); }

/* ─── Footer ──────────────────────────────────────────────────────────────── */
footer {
  background: var(--text);
  color: #94a3b8;
  padding: 48px 24px 24px;
}

.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand { font-size: 22px; font-weight: 800; color: white; margin-bottom: 10px; }
.footer-brand span { background: linear-gradient(135deg, #60a5fa, #c084fc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.footer-col h4 { color: white; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 14px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col ul a { color: #94a3b8; text-decoration: none; font-size: 14px; transition: color .12s; }
.footer-col ul a:hover { color: white; }
.footer-bottom { padding-top: 24px; border-top: 1px solid #1e293b; display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.footer-bottom a { color: #60a5fa; }

/* ─── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero { padding: 60px 16px 40px; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .install-strip-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; }
}

/* ─── Ads placeholder ─────────────────────────────────────────────────────── */
.ad-slot {
  background: var(--bg-alt);
  border: 1px dashed var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
}

.ad-slot-banner { width: 100%; height: 90px; margin: 16px 0; }
.ad-slot-rect { width: 300px; height: 250px; margin: 0 auto; }
