@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --surface: #FFFFFF;
  --surface-subtle: #F8FAFC;
  --text-heading: #1E293B;
  --text-body: #475569;
  --text-muted: #94A3B8;
  --border: #E2E8F0;
  --border-focus: #2563EB;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.05);
}

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

body {
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--surface-subtle);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-heading);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo span { color: var(--primary); }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-body);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--primary); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  gap: 6px;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover { background: var(--primary-hover); }

.btn-secondary {
  background: transparent;
  color: var(--text-body);
  border: 1px solid var(--border);
}

.btn-secondary:hover { background: var(--surface-subtle); }

.btn-ghost {
  background: transparent;
  color: var(--text-body);
}

.btn-ghost:hover { background: var(--surface-subtle); }

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

/* Hero */
.hero {
  background: var(--surface);
  padding: 80px 0 60px;
  text-align: center;
}

.hero h1 {
  font-size: 48px;
  font-weight: 600;
  color: var(--text-heading);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.hero p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 32px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Scenario Cards */
.scenarios {
  padding: 64px 0;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 32px;
  text-align: center;
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.scenario-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.scenario-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.scenario-card .icon {
  width: 40px;
  height: 40px;
  background: var(--surface-subtle);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.scenario-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-heading);
}

.scenario-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.scenario-card .arrow {
  margin-top: auto;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

/* How it works */
.how-it-works {
  background: var(--surface);
  padding: 64px 0;
  border-top: 1px solid var(--border);
}

.steps {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
}

.step {
  text-align: center;
  max-width: 240px;
}

.step-number {
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  margin: 0 auto 16px;
}

.step h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 8px;
}

.step p {
  font-size: 14px;
  color: var(--text-muted);
}

/* Tool Page */
.tool-page {
  padding: 48px 0;
}

.tool-header {
  text-align: center;
  margin-bottom: 48px;
}

.tool-header h1 {
  font-size: 32px;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 8px;
}

.tool-header p {
  font-size: 16px;
  color: var(--text-muted);
}

.tool-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 960px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .tool-layout { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .nav-links { display: none; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-heading);
  background: var(--surface);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.output-area {
  min-height: 280px;
  background: var(--surface-subtle);
  border-radius: var(--radius-sm);
  padding: 20px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-heading);
  white-space: pre-wrap;
  position: relative;
}

.output-area.empty {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  font-size: 12px;
}

/* Templates */
.templates {
  margin-top: 48px;
}

.templates h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 16px;
}

.template-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.template-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.template-card:hover {
  border-color: var(--primary);
}

.template-card h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 4px;
}

.template-card p {
  font-size: 13px;
  color: var(--text-muted);
}

/* Related */
.related {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.related h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 16px;
}

.related-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.related-links a {
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-body);
  text-decoration: none;
  transition: all 0.2s;
}

.related-links a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Pricing */
.pricing-cards {
  display: flex;
  gap: 24px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  width: 320px;
  text-align: center;
}

.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.pricing-card h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 8px;
}

.pricing-card .price {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 24px;
}

.pricing-card .price span {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
}

.pricing-card ul {
  list-style: none;
  text-align: left;
  margin-bottom: 32px;
}

.pricing-card ul li {
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-body);
  border-bottom: 1px solid var(--border);
}

.pricing-card ul li:last-child { border-bottom: none; }

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 64px;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover { color: var(--primary); }

.copyright {
  font-size: 13px;
  color: var(--text-muted);
}

/* Loading */
.loading-bar {
  height: 2px;
  background: var(--primary);
  animation: loading 1.5s ease-in-out infinite;
  border-radius: 1px;
}

@keyframes loading {
  0% { width: 0%; margin-left: 0; }
  50% { width: 100%; margin-left: 0; }
  100% { width: 0%; margin-left: 100%; }
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text-heading);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  z-index: 1000;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Legal pages */
.legal-page {
  background: var(--surface);
  padding: 64px 0;
  min-height: 60vh;
}

.legal-page h1 {
  font-size: 32px;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 24px;
}

.legal-page h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-heading);
  margin: 32px 0 12px;
}

.legal-page p {
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 12px;
}

.usage-limit {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.usage-limit strong {
  color: var(--text-heading);
}
