/* ═══════════════════════════════════════════════════════════
   DocForge — Landing Page Styles
   ═══════════════════════════════════════════════════════════ */

:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #EFF6FF;
  --green: #059669;
  --purple: #7C3AED;
  --dark: #0F172A;
  --slate: #1E293B;
  --muted: #64748B;
  --border: #E2E8F0;
  --bg-light: #F8FAFC;
  --bg-accent: #F0F4FF;
  --white: #FFFFFF;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.10), 0 4px 6px rgba(0,0,0,0.05);
}

/* ─── Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--slate);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ─── Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 15px; border: none; cursor: pointer;
  border-radius: var(--radius-sm); transition: all 0.2s ease;
  padding: 10px 22px; font-family: inherit;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-sm { padding: 8px 18px; font-size: 14px; }
.btn-block { width: 100%; }

/* ─── Navigation ─────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; color: var(--dark); }
.logo-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--primary); color: white; font-size: 18px; font-weight: 800;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 15px; font-weight: 500; color: var(--muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--dark); }
.nav-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; }

/* ─── Hero ──────────────────────────────────────────── */
.hero { text-align: center; padding: 80px 0 60px; background: linear-gradient(180deg, var(--bg-accent) 0%, var(--white) 100%); }
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.hero-badge {
  display: inline-block; padding: 6px 16px; border-radius: 100px;
  background: var(--primary-light); color: var(--primary);
  font-size: 14px; font-weight: 600; margin-bottom: 24px;
  border: 1px solid #BFDBFE;
}
.hero h1 {
  font-size: 52px; font-weight: 800; line-height: 1.1;
  color: var(--dark); max-width: 720px; margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.hero-sub { font-size: 18px; color: var(--muted); max-width: 600px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 12px; margin-bottom: 48px; flex-wrap: wrap; justify-content: center; }
.hero-stats { display: flex; gap: 48px; flex-wrap: wrap; justify-content: center; }
.stat { text-align: center; }
.stat strong { display: block; font-size: 32px; font-weight: 800; color: var(--primary); }
.stat span { font-size: 13px; color: var(--muted); }

/* ─── Code Section ──────────────────────────────────── */
.code-section { padding: 80px 0; background: var(--bg-light); }
.code-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.code-left h2 { font-size: 32px; font-weight: 800; color: var(--dark); margin-bottom: 12px; letter-spacing: -0.02em; }
.code-left p { font-size: 16px; color: var(--muted); margin-bottom: 20px; }
.check-list { list-style: none; }
.check-list li { padding: 6px 0; font-size: 15px; color: var(--slate); }
.code-right { background: #0F172A; border-radius: var(--radius); overflow: hidden; }
.code-tabs { display: flex; background: #1E293B; }
.tab {
  padding: 10px 20px; background: none; border: none; color: #94A3B8;
  font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
  border-bottom: 2px solid transparent; transition: all 0.2s;
}
.tab.active { color: white; border-bottom-color: var(--primary); background: #0F172A; }
.code-block {
  display: none; padding: 20px; font-size: 13px; line-height: 1.7;
  overflow-x: auto; margin: 0; white-space: pre-wrap; word-break: break-word;
}
.code-block.active { display: block; }
.code-block code { color: #94A3B8; font-family: 'Fira Code', 'Consolas', monospace; }

/* ─── Features ──────────────────────────────────────── */
.features { padding: 80px 0; }
.section-title { text-align: center; font-size: 36px; font-weight: 800; color: var(--dark); margin-bottom: 8px; letter-spacing: -0.02em; }
.section-sub { text-align: center; font-size: 18px; color: var(--muted); margin-bottom: 48px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
  background: white; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; transition: all 0.2s;
}
.feature-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.feature-icon { font-size: 36px; margin-bottom: 16px; }
.feature-card h3 { font-size: 18px; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--muted); }

/* ─── Templates ─────────────────────────────────────── */
.templates { padding: 80px 0; background: var(--bg-light); }
.template-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.template-card { background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: all 0.2s; }
.template-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.template-preview {
  height: 180px; background: var(--bg-light); padding: 16px;
  display: flex; flex-direction: column; gap: 8px; position: relative;
  border-bottom: 1px solid var(--border);
}
.preview-bar { height: 4px; border-radius: 2px; margin-bottom: 8px; }
.preview-bar.blue { background: var(--primary); }
.preview-bar.green { background: var(--green); }
.preview-bar.purple { background: var(--purple); }
.preview-line { height: 6px; background: #CBD5E1; border-radius: 3px; }
.preview-line.w60 { width: 60%; }
.preview-line.w40 { width: 40%; }
.preview-line.w50 { width: 50%; }
.preview-line.w70 { width: 70%; }
.preview-line.w80 { width: 80%; }
.preview-line.center { align-self: center; }
.preview-table { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.preview-row { height: 8px; background: #E2E8F0; border-radius: 2px; }
.preview-row.dark { background: var(--primary); }
.preview-row.light { background: #F1F5F9; }
.preview-stamp {
  position: absolute; right: 20px; top: 30px;
  padding: 4px 12px; background: #ECFDF5; color: var(--green);
  border: 2px solid var(--green); border-radius: 4px;
  font-size: 12px; font-weight: 800;
}
.preview-border { position: absolute; inset: 8px; border: 2px solid #D4AF37; border-radius: 4px; }
.preview-seal { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); font-size: 24px; }
.preview-metric { height: 30px; background: #EDE9FE; border-radius: 4px; margin-top: 4px; }
.template-coming .template-preview { display: flex; align-items: center; justify-content: center; }
.coming-soon { font-size: 18px; color: var(--muted); font-weight: 600; }
.template-card h3 { padding: 16px 16px 4px; font-size: 17px; font-weight: 700; color: var(--dark); }
.template-card p { padding: 0 16px 16px; font-size: 13px; color: var(--muted); }

/* ─── Pricing ───────────────────────────────────────── */
.pricing { padding: 80px 0; }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 900px; margin: 0 auto; }
.pricing-card {
  background: white; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; position: relative; transition: all 0.2s;
}
.pricing-card:hover { box-shadow: var(--shadow-md); }
.pricing-card.featured {
  border-color: var(--primary); border-width: 2px;
  box-shadow: var(--shadow-lg); transform: scale(1.03);
}
.plan-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: white; font-size: 12px; font-weight: 700;
  padding: 4px 16px; border-radius: 100px;
}
.plan-name { font-size: 14px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.plan-price { font-size: 42px; font-weight: 800; color: var(--dark); margin: 8px 0; }
.plan-price span { font-size: 16px; font-weight: 500; color: var(--muted); }
.plan-desc { font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.plan-features { list-style: none; margin-bottom: 28px; }
.plan-features li { padding: 6px 0; font-size: 14px; }
.plan-features li.muted { color: var(--border); }

/* ─── CTA ───────────────────────────────────────────── */
.cta { padding: 60px 0; text-align: center; background: linear-gradient(135deg, var(--primary) 0%, #7C3AED 100%); color: white; }
.cta h2 { font-size: 32px; font-weight: 800; margin-bottom: 12px; }
.cta p { font-size: 18px; margin-bottom: 28px; opacity: 0.9; }
.cta .btn-primary { background: white; color: var(--primary); }
.cta .btn-primary:hover { background: var(--bg-light); }

/* ─── Footer ────────────────────────────────────────── */
.footer { background: var(--dark); color: #94A3B8; padding: 48px 0 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; padding-bottom: 32px; }
.footer-brand .logo { color: white; margin-bottom: 12px; }
.footer-brand p { font-size: 14px; }
.footer-links { display: flex; gap: 48px; flex-wrap: wrap; }
.footer-col h4 { color: white; font-size: 14px; font-weight: 700; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-col a { display: block; padding: 4px 0; font-size: 14px; color: #94A3B8; transition: color 0.2s; }
.footer-col a:hover { color: white; }
.footer-bottom { border-top: 1px solid #1E293B; padding: 20px 0; text-align: center; font-size: 13px; }

/* ─── Modal ─────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.5); align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
  background: white; border-radius: var(--radius); padding: 32px;
  max-width: 440px; width: 90%; position: relative;
  box-shadow: var(--shadow-lg);
}
.modal h2 { font-size: 24px; font-weight: 800; color: var(--dark); margin-bottom: 8px; }
.modal p { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.input {
  width: 100%; padding: 12px 16px; border: 2px solid var(--border);
  border-radius: var(--radius-sm); font-size: 15px; font-family: inherit;
  margin-bottom: 16px; transition: border-color 0.2s;
}
.input:focus { outline: none; border-color: var(--primary); }
.modal-result { margin-top: 16px; }
.modal-result .key-box {
  background: var(--bg-light); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px;
  font-family: monospace; font-size: 14px; word-break: break-all;
  cursor: pointer; color: var(--primary); font-weight: 600;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; font-size: 24px; cursor: pointer;
  color: var(--muted); line-height: 1;
}
.modal-close:hover { color: var(--dark); }

/* ─── Playground / Docs Shared ──────────────────────── */
.page-header { background: var(--bg-accent); padding: 40px 0; border-bottom: 1px solid var(--border); }
.page-header h1 { font-size: 32px; font-weight: 800; color: var(--dark); }
.page-header p { font-size: 16px; color: var(--muted); margin-top: 4px; }
.page-body { padding: 48px 0; }
.card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.card h2 { font-size: 22px; font-weight: 700; color: var(--dark); margin-bottom: 12px; }
.card h3 { font-size: 16px; font-weight: 700; color: var(--slate); margin: 16px 0 8px; }
.card p { font-size: 15px; color: var(--slate); margin-bottom: 12px; }
.card code, pre code { font-family: 'Fira Code', 'Consolas', monospace; font-size: 13px; }
.inline-code { background: var(--bg-light); padding: 2px 6px; border-radius: 4px; font-family: monospace; font-size: 13px; }
pre { background: var(--dark); color: #94A3B8; padding: 16px; border-radius: var(--radius-sm); overflow-x: auto; font-size: 13px; line-height: 1.6; }
pre code { color: #C4B5FD; }

/* ─── Playground Specific ───────────────────────────── */
.pg-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.pg-left, .pg-right { display: flex; flex-direction: column; gap: 16px; }
.pg-select { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.select { padding: 10px 16px; border: 2px solid var(--border); border-radius: var(--radius-sm); font-size: 15px; font-family: inherit; background: white; cursor: pointer; }
.select:focus { outline: none; border-color: var(--primary); }
.textarea {
  width: 100%; min-height: 400px; padding: 16px; border: 2px solid var(--border);
  border-radius: var(--radius); font-family: 'Fira Code', monospace; font-size: 13px;
  line-height: 1.6; resize: vertical; background: var(--dark); color: #C4B5FD;
}
.textarea:focus { outline: none; border-color: var(--primary); }
.pdf-preview { min-height: 500px; border: 2px solid var(--border); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; background: var(--bg-light); }
.pdf-preview iframe { width: 100%; height: 500px; border: none; border-radius: var(--radius); }
.pdf-placeholder { text-align: center; color: var(--muted); }
.pdf-placeholder .icon { font-size: 48px; margin-bottom: 12px; }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; }
.alert-error { background: #FEF2F2; color: #DC2626; border: 1px solid #FECACA; }
.alert-success { background: #F0FDF4; color: #16A34A; border: 1px solid #BBF7D0; }
.alert-info { background: var(--primary-light); color: var(--primary); border: 1px solid #BFDBFE; }
.usage-bar { background: var(--bg-light); border-radius: 100px; height: 8px; overflow: hidden; margin-top: 8px; }
.usage-fill { background: var(--primary); height: 100%; border-radius: 100px; transition: width 0.3s; }

/* ─── Success Page ──────────────────────────────────── */
.success-page { text-align: center; padding: 100px 24px; }
.success-icon { font-size: 64px; margin-bottom: 24px; }
.success-page h1 { font-size: 36px; font-weight: 800; color: var(--dark); margin-bottom: 16px; }
.success-page p { font-size: 18px; color: var(--muted); margin-bottom: 32px; }

/* ─── Responsive ────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; background: white; flex-direction: column; padding: 20px; gap: 16px; border-bottom: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .hero h1 { font-size: 36px; }
  .hero-stats { gap: 24px; }
  .stat strong { font-size: 24px; }
  .code-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .template-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; }
  .pricing-card.featured { transform: none; }
  .pg-layout { grid-template-columns: 1fr; }
  .section-title { font-size: 28px; }
  .footer-inner { flex-direction: column; }
}
