:root {
  --bg-gradient-start: #4f46e5;
  --bg-gradient-end: #7c3aed;
  --bg-page: #f5f5fb;
  --bg-alt: #ffffff;
  --text-main: #111827;
  --text-muted: #6b7280;
  --accent: #4f46e5;
  --accent-soft: #e0e7ff;
  --border-subtle: #e5e7eb;
  --code-bg: #030712;
  --code-text: #e5e7eb;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  background: var(--bg-page);
}

/* Layout helpers */

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-intro {
  max-width: 640px;
  color: var(--text-muted);
}

/* Hero */

.hero {
  background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
  color: white;
  padding: 4.5rem 0 3.5rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr);
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.4rem, 3.2vw + 1.4rem, 3.4rem);
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: 1.05rem;
  max-width: 640px;
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.hero-footnote {
  font-size: 0.9rem;
  opacity: 0.9;
}

.hero-highlight {
  background: rgba(15, 23, 42, 0.16);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  backdrop-filter: blur(10px);
}

.hero-highlight h2 {
  font-size: 1.2rem;
  margin-top: 0;
}

.hero-highlight ul {
  padding-left: 1.1rem;
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease,
    transform 0.06s ease-out;
}

.btn-primary {
  background: white;
  color: #111827;
}

.btn-primary:hover {
  transform: translateY(-1px);
  background: #eef2ff;
}

.btn-ghost {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 0.25);
}

.btn-full {
  width: 100%;
}

/* Forms */

.card {
  background: white;
  border-radius: 14px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.demo-card {
  margin-top: 1.5rem;
}

.label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.textarea,
.input,
.select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
}

.textarea:focus,
.input:focus,
.select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.2);
}

.demo-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.5fr);
  gap: 1rem;
  margin: 1rem 0 1.25rem;
}

.help-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* Features / lists */

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem;
}

.features h2 {
  margin-top: 0;
}

.features ul {
  padding-left: 1.2rem;
}

/* Steps */

.steps-list {
  padding-left: 1.2rem;
  max-width: 640px;
}

.steps-list li {
  margin-bottom: 0.75rem;
}

/* Examples */

.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.75rem;
}

/* Code blocks */

.code-block {
  margin: 0;
  padding: 0.85rem 1rem;
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: 10px;
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
    monospace;
  font-size: 0.85rem;
  overflow-x: auto;
}

/* Footer */

.footer {
  padding: 1.75rem 0 2.25rem;
  background: #020617;
  color: rgba(248, 250, 252, 0.82);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
}

.footer a {
  color: #a5b4fc;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* Result output */

#result-output {
  margin-top: 1.5rem;
  max-height: 360px;
}

/* Responsive */

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-highlight {
    order: -1;
  }

  .features {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 3.5rem;
  }

  .card {
    padding: 1.5rem 1.25rem;
  }

  .demo-row {
    grid-template-columns: minmax(0, 1fr);
  }
}
