/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #1a1a2e; line-height: 1.6; background: #fff; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ===== Nav ===== */
.nav { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.95); backdrop-filter: blur(8px); border-bottom: 1px solid #e8e8f0; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-size: 1.4rem; font-weight: 800; color: #1a1a2e; }
.logo span { color: #4f46e5; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links li a { font-size: 0.9rem; color: #555; transition: color 0.2s; }
.nav-links li a:hover { color: #4f46e5; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; font-weight: 600; border-radius: 8px; cursor: pointer; transition: all 0.2s; border: none; text-decoration: none; }
.btn-primary { background: #4f46e5; color: #fff; }
.btn-primary:hover { background: #4338ca; }
.btn-outline { background: transparent; color: #4f46e5; border: 2px solid #4f46e5; }
.btn-outline:hover { background: #f0f0ff; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-full { width: 100%; padding: 12px; }

/* ===== Hero ===== */
.hero { padding: 80px 0 60px; background: linear-gradient(135deg, #f8f7ff 0%, #fff 60%); text-align: center; }
.hero-badge { display: inline-block; background: #e8e6ff; color: #4f46e5; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; padding: 6px 14px; border-radius: 100px; margin-bottom: 20px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1.15; margin-bottom: 20px; }
.highlight { color: #4f46e5; }
.hero-sub { font-size: 1.15rem; color: #555; max-width: 640px; margin: 0 auto 32px; }
.hero-ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 48px; }
.hero-stats { display: flex; gap: 40px; justify-content: center; flex-wrap: wrap; }
.stat { text-align: center; font-size: 0.9rem; color: #666; }
.stat span { display: block; font-size: 1.5rem; font-weight: 800; color: #4f46e5; }

/* ===== Sections ===== */
.section { padding: 72px 0; }
.section h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; text-align: center; margin-bottom: 16px; }
.section-sub { text-align: center; color: #666; font-size: 1.05rem; margin-bottom: 48px; }

/* ===== Problem ===== */
.problem-section { background: #fafafa; }
.problem-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; margin-top: 40px; }
.problem-card { background: #fff; border: 1px solid #e0e0ea; border-radius: 12px; padding: 28px 24px; text-align: center; }
.problem-number { font-size: 2.2rem; font-weight: 800; color: #1a1a2e; }
.problem-label { color: #666; font-size: 0.9rem; margin-top: 8px; }
.highlight-card { background: #4f46e5; border-color: #4f46e5; }
.highlight-card .problem-number, .highlight-card .problem-label { color: #fff; }

/* ===== Demo ===== */
.demo-widget { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 32px; }
.demo-upload { border: 2px dashed #d0d0e8; border-radius: 12px; padding: 48px 32px; text-align: center; cursor: pointer; transition: border-color 0.2s; }
.demo-upload:hover { border-color: #4f46e5; }
.upload-icon { font-size: 2.5rem; margin-bottom: 12px; }
.demo-upload button { background: none; border: none; color: #4f46e5; font-weight: 600; cursor: pointer; text-decoration: underline; }
.upload-hint { font-size: 0.85rem; color: #888; margin-top: 8px; }
.demo-result { background: #1a1a2e; border-radius: 12px; padding: 20px; overflow: auto; max-height: 480px; }
.result-header { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.result-status { background: #22c55e; color: #fff; font-size: 0.75rem; font-weight: 700; padding: 4px 10px; border-radius: 100px; }
.result-meta { color: #888; font-size: 0.8rem; }
#result-json { color: #a8b3c5; font-size: 0.8rem; font-family: 'Courier New', monospace; white-space: pre; }

/* ===== Code ===== */
.code-section { background: #f8f7ff; }
.tabs { display: flex; gap: 4px; margin-bottom: 16px; justify-content: center; }
.tab { padding: 8px 20px; border-radius: 8px 8px 0 0; background: #e0e0f0; border: none; cursor: pointer; font-weight: 600; font-size: 0.9rem; color: #555; }
.tab.active { background: #1a1a2e; color: #fff; }
.code-block { background: #1a1a2e; border-radius: 0 12px 12px 12px; padding: 28px; overflow-x: auto; }
.code-block pre { margin: 0; }
.code-block code { color: #a8b3c5; font-family: 'Courier New', monospace; font-size: 0.85rem; line-height: 1.6; }

/* ===== Features ===== */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: 48px; }
.feature-card { background: #fff; border: 1px solid #e8e8f0; border-radius: 12px; padding: 28px; }
.feature-icon { font-size: 2rem; margin-bottom: 12px; }
.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { color: #666; font-size: 0.9rem; line-height: 1.6; }
.feature-card code { background: #f0f0ff; color: #4f46e5; padding: 1px 5px; border-radius: 4px; font-size: 0.8rem; }

/* ===== Use Cases ===== */
.use-cases-section { background: #fafafa; }
.use-cases-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: 48px; }
.use-case { background: #fff; border: 1px solid #e8e8f0; border-radius: 12px; padding: 28px; }
.use-case h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; }
.use-case p { color: #555; font-size: 0.9rem; margin-bottom: 16px; }
.use-case ul li { font-size: 0.85rem; color: #666; padding: 4px 0; padding-left: 16px; position: relative; }
.use-case ul li::before { content: '\2713'; position: absolute; left: 0; color: #22c55e; font-weight: 700; }

/* ===== Pricing ===== */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; margin-top: 48px; }
.pricing-card { background: #fff; border: 2px solid #e8e8f0; border-radius: 16px; padding: 32px 24px; position: relative; }
.pricing-card.featured { border-color: #4f46e5; box-shadow: 0 8px 30px rgba(79,70,229,0.15); }
.pricing-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: #4f46e5; color: #fff; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; padding: 4px 12px; border-radius: 100px; }
.pricing-name { font-size: 1rem; font-weight: 700; color: #555; margin-bottom: 12px; }
.pricing-price { font-size: 2.5rem; font-weight: 800; color: #1a1a2e; }
.pricing-price span { font-size: 1rem; font-weight: 400; color: #888; }
.pricing-min { font-size: 0.8rem; color: #888; margin: 4px 0 20px; }
.pricing-features { margin-bottom: 24px; }
.pricing-features li { font-size: 0.85rem; color: #555; padding: 5px 0; padding-left: 18px; position: relative; }
.pricing-features li::before { content: '\2713'; position: absolute; left: 0; color: #22c55e; font-weight: 700; }
.pricing-enterprise { text-align: center; margin-top: 32px; color: #666; font-size: 0.9rem; }
.pricing-enterprise a { color: #4f46e5; font-weight: 600; }

/* ===== Signup ===== */
.signup-section { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.signup-box { text-align: center; max-width: 480px; margin: 0 auto; }
.signup-box h2 { color: #fff; margin-bottom: 12px; }
.signup-box p { color: rgba(255,255,255,0.8); margin-bottom: 32px; }
.signup-form { display: flex; gap: 12px; }
.signup-form input { flex: 1; padding: 14px 18px; border-radius: 8px; border: none; font-size: 1rem; background: rgba(255,255,255,0.15); color: #fff; }
.signup-form input::placeholder { color: rgba(255,255,255,0.6); }
.signup-form input:focus { outline: none; background: rgba(255,255,255,0.25); }
.signup-result { background: rgba(255,255,255,0.1); border-radius: 12px; padding: 24px; margin-top: 24px; }
.signup-result h3 { color: #fff; margin-bottom: 12px; }
.api-key-display { background: rgba(0,0,0,0.3); color: #7dd3fc; font-family: monospace; font-size: 0.85rem; padding: 12px 16px; border-radius: 8px; word-break: break-all; margin-bottom: 12px; }
.key-warning { color: rgba(255,255,255,0.7); font-size: 0.85rem; margin-bottom: 16px; }

/* ===== FAQ ===== */
.faq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; margin-top: 48px; }
.faq-item { background: #f8f7ff; border-radius: 12px; padding: 24px; }
.faq-item h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; }
.faq-item p { color: #555; font-size: 0.9rem; line-height: 1.6; }

/* ===== Footer ===== */
.footer { background: #1a1a2e; padding: 60px 0 0; }
.footer-inner { display: grid; grid-template-columns: 2fr 3fr; gap: 48px; }
.footer-brand .logo { color: #fff; }
.footer-brand p { color: #888; font-size: 0.85rem; margin-top: 12px; max-width: 280px; }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-links h4 { color: #fff; font-size: 0.85rem; font-weight: 700; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.06em; }
.footer-links li { margin-bottom: 8px; }
.footer-links li a { color: #888; font-size: 0.85rem; transition: color 0.2s; }
.footer-links li a:hover { color: #a8b3ff; }
.footer-bottom { border-top: 1px solid #2a2a40; margin-top: 48px; padding: 20px 0; }
.footer-bottom p { color: #555; font-size: 0.8rem; text-align: center; }

/* ===== Accessibility ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.sr-only-focusable:focus {
  position: fixed;
  top: 10px;
  left: 10px;
  width: auto;
  height: auto;
  padding: 15px 20px;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background: #4f46e5;
  color: #fff;
  font-weight: bold;
  z-index: 10000;
  border-radius: 4px;
}
a:focus, button:focus, input:focus, select:focus {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .demo-widget { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
  .signup-form { flex-direction: column; }
  .nav-links { display: none; }
}
