/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1a1a2e;
  line-height: 1.6;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; }

/* === Layout === */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section-alt { background: #f8f9fc; }
.section-title { font-size: 2.25rem; font-weight: 800; text-align: center; margin-bottom: 8px; letter-spacing: -0.02em; }
.section-sub { text-align: center; color: #64748b; font-size: 1.125rem; margin-bottom: 56px; max-width: 560px; margin-left: auto; margin-right: auto; }

/* === Buttons === */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit; font-weight: 600; border-radius: 10px;
  cursor: pointer; transition: all 0.2s ease; border: 2px solid transparent;
  font-size: 0.9375rem; padding: 10px 20px; white-space: nowrap;
}
.btn-sm { padding: 8px 16px; font-size: 0.875rem; }
.btn-lg { padding: 14px 28px; font-size: 1.0625rem; }
.btn-primary { background: #4f46e5; color: #fff; border-color: #4f46e5; }
.btn-primary:hover { background: #4338ca; border-color: #4338ca; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(79,70,229,0.35); }
.btn-outline { background: #fff; color: #4f46e5; border-color: #4f46e5; }
.btn-outline:hover { background: #4f46e5; color: #fff; }
.btn-ghost { background: transparent; color: #64748b; border-color: #e2e8f0; }
.btn-ghost:hover { border-color: #cbd5e1; color: #1a1a2e; }
.btn-block { width: 100%; }

/* === Nav === */
.nav { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.92); backdrop-filter: blur(12px); border-bottom: 1px solid #f1f5f9; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-weight: 700; font-size: 1.25rem; display: flex; align-items: center; gap: 6px; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 0.9375rem; font-weight: 500; color: #64748b; }
.nav-links a:hover { color: #1a1a2e; }

/* === Hero === */
.hero { padding: 100px 0 80px; text-align: center; }
.badge {
  display: inline-block; padding: 6px 16px; background: #eef2ff; color: #4f46e5;
  font-size: 0.875rem; font-weight: 600; border-radius: 999px; margin-bottom: 24px;
}
.hero h1 { font-size: 3.75rem; font-weight: 800; line-height: 1.08; letter-spacing: -0.03em; margin-bottom: 20px; }
.hero-sub { font-size: 1.25rem; color: #64748b; max-width: 620px; margin: 0 auto 36px; line-height: 1.65; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 48px; }
.hero-proof { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 0.875rem; color: #94a3b8; }
.avatars { display: flex; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; color: #fff; font-size: 0.75rem;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
  border: 2px solid #fff; margin-left: -8px;
}
.avatars .avatar:first-child { margin-left: 0; }

/* === Steps === */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.step { text-align: center; padding: 32px 24px; }
.step-num {
  width: 48px; height: 48px; border-radius: 50%; background: #4f46e5; color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
  font-size: 1.25rem; margin: 0 auto 20px;
}
.step h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: 8px; }
.step p { color: #64748b; font-size: 0.9375rem; }

/* === Features === */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.feature { padding: 32px; background: #fff; border-radius: 16px; border: 1px solid #f1f5f9; transition: box-shadow 0.2s; }
.feature:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.06); }
.feature-icon { font-size: 2rem; margin-bottom: 16px; }
.feature h3 { font-size: 1.0625rem; font-weight: 700; margin-bottom: 8px; }
.feature p { color: #64748b; font-size: 0.9375rem; }

/* === Testimonials === */
.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.testimonial {
  padding: 32px; background: #f8f9fc; border-radius: 16px; display: flex;
  flex-direction: column; gap: 16px;
}
.stars { color: #f59e0b; font-size: 1.125rem; letter-spacing: 2px; }
.testimonial p { font-size: 0.9375rem; color: #334155; flex: 1; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 12px; font-size: 0.875rem; }
.testimonial-author span { color: #94a3b8; }

/* === Pricing === */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; }
.plan {
  padding: 36px 32px; background: #fff; border-radius: 16px;
  border: 1px solid #e2e8f0; position: relative; text-align: center;
}
.plan-popular { border-color: #4f46e5; box-shadow: 0 8px 32px rgba(79,70,229,0.12); transform: scale(1.04); }
.plan-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: #4f46e5; color: #fff; font-size: 0.75rem; font-weight: 700;
  padding: 4px 16px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.05em;
}
.plan-name { font-size: 1.125rem; font-weight: 700; margin-bottom: 8px; }
.plan-price { font-size: 3rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 24px; }
.plan-price span { font-size: 1rem; font-weight: 500; color: #94a3b8; }
.plan-features { margin-bottom: 28px; }
.plan-features li { padding: 6px 0; font-size: 0.9375rem; color: #475569; }

/* === CTA Section === */
.cta-section { background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; }
.cta-section h2 { color: #fff; }
.cta-section .section-sub { color: rgba(255,255,255,0.8); }
.cta-section .btn-primary { background: #fff; color: #4f46e5; border-color: #fff; }
.cta-section .btn-primary:hover { background: #f0f0ff; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }

/* === Footer === */
.footer { padding: 40px 0; border-top: 1px solid #f1f5f9; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; font-size: 0.875rem; color: #94a3b8; }
.footer-brand { font-weight: 700; font-size: 1rem; color: #1a1a2e; }
.footer-links { display: flex; gap: 24px; }
.footer-links a:hover { color: #1a1a2e; }

/* === App Page === */
.app-layout { min-height: 100vh; background: #f8f9fc; }
.app-header { background: #fff; border-bottom: 1px solid #f1f5f9; padding: 0 24px; }
.app-header-inner { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 56px; }
.usage-badge { font-size: 0.8125rem; color: #64748b; background: #f1f5f9; padding: 6px 14px; border-radius: 8px; font-weight: 500; }
.usage-badge strong { color: #4f46e5; }

.app-main { max-width: 1120px; margin: 0 auto; padding: 32px 24px; display: grid; grid-template-columns: 400px 1fr; gap: 32px; align-items: start; }

/* Form Panel */
.form-panel { background: #fff; border-radius: 16px; padding: 32px; border: 1px solid #e2e8f0; }
.form-panel h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.8125rem; font-weight: 600; color: #475569; margin-bottom: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
input, select, textarea {
  width: 100%; padding: 10px 14px; border: 1px solid #e2e8f0; border-radius: 10px;
  font-family: inherit; font-size: 0.9375rem; color: #1a1a2e; background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(79,70,229,0.1); }
textarea { resize: vertical; min-height: 80px; }
.btn-generate { margin-top: 8px; width: 100%; padding: 14px; font-size: 1rem; }
.btn-generate:disabled { opacity: 0.6; cursor: not-allowed; }

/* Results Panel */
.results-panel { background: #fff; border-radius: 16px; border: 1px solid #e2e8f0; overflow: hidden; min-height: 400px; }
.results-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 80px 32px; color: #94a3b8; text-align: center; }
.results-empty-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
.results-empty p { font-size: 0.9375rem; }

.tabs { display: flex; border-bottom: 1px solid #e2e8f0; background: #f8f9fc; }
.tab {
  flex: 1; padding: 14px 16px; font-size: 0.875rem; font-weight: 600; color: #94a3b8;
  text-align: center; cursor: pointer; border-bottom: 2px solid transparent;
  transition: all 0.15s; background: transparent;
}
.tab:hover { color: #475569; }
.tab.active { color: #4f46e5; border-bottom-color: #4f46e5; background: #fff; }
.tab-content { display: none; padding: 28px 32px; }
.tab-content.active { display: block; }
.tab-content-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.tab-content-header h3 { font-size: 1rem; font-weight: 700; }
.btn-copy { font-size: 0.8125rem; padding: 6px 14px; border-radius: 8px; }
.generated-text { font-size: 0.9375rem; line-height: 1.75; color: #334155; white-space: pre-wrap; }

/* Loading */
.loading-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 80px 32px; gap: 16px; }
.spinner { width: 40px; height: 40px; border: 3px solid #e2e8f0; border-top-color: #4f46e5; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-state p { color: #64748b; font-size: 0.9375rem; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; right: 24px; background: #1a1a2e; color: #fff;
  padding: 12px 20px; border-radius: 10px; font-size: 0.875rem; font-weight: 500;
  transform: translateY(80px); opacity: 0; transition: all 0.3s ease; z-index: 999;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* Error */
.field-error { border-color: #ef4444 !important; }
.error-msg { color: #ef4444; font-size: 0.75rem; margin-top: 4px; }

/* === Responsive === */
@media (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
  .hero-sub { font-size: 1.0625rem; }
  .steps, .features, .testimonials, .pricing { grid-template-columns: 1fr; }
  .plan-popular { transform: none; }
  .app-main { grid-template-columns: 1fr; }
  .nav-links a:not(.btn) { display: none; }
  .footer-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 2rem; }
  .section { padding: 64px 0; }
  .form-row { grid-template-columns: 1fr; }
}
