:root {
  --primary: #ff6a3d;
  --primary-light: #fff6f3;
  --primary-hover: #e85a2d;
  --text: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --surface: #ffffff;
  --surface-alt: #f8f7f5;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --radius: 8px;
  --radius-card: 12px;
  --font:
    "Geist Mono", ui-monospace, "Cascadia Code", "Source Code Pro", monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ── Layout ── */

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Nav ── */

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 0.5px solid var(--border);
  padding: 14px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
}

.nav-logo-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: var(--text-secondary);
}

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

.nav-links .nav-cta {
  color: var(--primary);
  font-weight: 500;
}

/* ── Hero ── */

.hero {
  padding: 72px 0 56px;
  text-align: center;
}

.badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
  border: 0.5px solid rgba(255, 106, 61, 0.2);
}

.hero h1 {
  font-size: 34px;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.hero h1 span {
  background: linear-gradient(90deg, #ff6a3d 0%, rgba(255, 138, 115, 0.9) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 28px;
  line-height: 1.7;
}

.cta-group {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--text);
  color: white;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}

.btn-primary:hover {
  background: #1e293b;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: 0.5px solid var(--border-strong);
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}

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

.hero-sub-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Code snippet card ── */

.snippet-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-bottom: 40px;
}

.snippet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 0.5px solid var(--border);
  background: var(--surface-alt);
}

.snippet-header span {
  font-size: 12px;
  color: var(--text-secondary);
}

.copy-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 0.5px solid var(--border-strong);
  border-radius: 6px;
  padding: 4px 10px;
  font-family: var(--font);
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.copy-btn:hover {
  background: var(--surface);
  color: var(--text);
}

.copy-btn.copied {
  color: #16a34a;
  border-color: rgba(22, 163, 74, 0.3);
}

.snippet-body {
  padding: 16px 14px;
  background: #fafaf9;
}

.snippet-body pre {
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
  max-width: 100%;
}

.snippet-card {
  overflow: hidden;
}

.token-tag {
  color: #e25a2a;
}
.token-attr {
  color: #0369a1;
}
.token-str {
  color: #16a34a;
}
.token-fn {
  color: #7c3aed;
}

/* ── Features grid ── */

.section {
  padding: 40px 0;
}

.section-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.feature-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px;
}

.feature-icon {
  font-size: 22px;
  color: var(--primary);
  margin-bottom: 10px;
}

.feature-card h3 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 5px;
}

.feature-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── Demo section ── */

.demo-section {
  padding: 48px 20px;
  border-top: 0.5px solid var(--border);
  border-bottom: 0.5px solid var(--border);
  background: var(--surface-alt);
}

.demo-section .container {
  text-align: center;
}

.demo-section h2 {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 8px;
}

.demo-section p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

#chatbot-container {
  min-height: 640px;
  position: relative;
}

n8nchatui-inpage {
  display: block;
  min-height: 640px;
}

/* ── Demo style tag ── */

.demo-style-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 106, 61, 0.1);
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.demo-style-tag-popup {
  background: rgba(99, 102, 241, 0.1);
  color: #4f46e5;
}

.demo-section-popup {
  background: #f5f4ff;
  border-top-color: rgba(99, 102, 241, 0.12);
  border-bottom-color: rgba(99, 102, 241, 0.12);
}

/* ── Popup preview mockup ── */

.popup-preview-mockup {
  max-width: 560px;
  margin: 16px auto 0;
  background: #fff;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.mockup-browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #f1f0ee;
  border-bottom: 0.5px solid var(--border);
}

.mockup-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-strong);
  display: inline-block;
}

.mockup-url {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 6px;
}

.mockup-body {
  padding: 24px 20px 20px;
  min-height: 220px;
  position: relative;
}

.mockup-hero-line {
  height: 14px;
  width: 55%;
  background: #d4d2ca;
  border-radius: 4px;
  margin-bottom: 14px;
}

.mockup-guide-hint {
  position: absolute;
  bottom: 22px;
  left: 20px;
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font);
  pointer-events: none;
}

.mockup-guide-arrow {
  font-size: 16px;
  color: var(--primary);
  line-height: 1;
}

.mockup-line {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  margin-bottom: 10px;
}

.mockup-line.w-60 {
  width: 60%;
}
.mockup-line.w-40 {
  width: 40%;
}
.mockup-line.w-80 {
  width: 80%;
}
.mockup-line.w-50 {
  width: 50%;
}

.popup-float-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 48px;
  height: 48px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 22px;
  cursor: pointer;
  transition:
    transform 0.15s,
    background 0.15s;
  box-shadow: 0 2px 8px rgba(255, 106, 61, 0.4);
}

.popup-float-btn:hover {
  transform: scale(1.08);
  background: var(--primary-hover);
}

/* ── Demo inactive placeholder (inline section when popup is active) ── */

.demo-inactive-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 240px;
  border: 0.5px dashed var(--border-strong);
  border-radius: var(--radius-card);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 28px;
  text-align: center;
}

.demo-inactive-placeholder p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

/* ── Popup active state ── */

.popup-active-area {
  text-align: center;
  padding: 40px 20px;
  border: 0.5px dashed rgba(79, 70, 229, 0.3);
  border-radius: var(--radius-card);
  background: rgba(79, 70, 229, 0.03);
}

.demo-active-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(79, 70, 229, 0.08);
  color: #4f46e5;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.popup-active-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.restore-btn-full {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0.5px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}

.restore-btn-full:hover {
  background: var(--surface-alt);
  color: var(--text);
}

@media (max-width: 640px) {
  .popup-preview-mockup {
    max-width: 100%;
  }
}

/* ── Use cases ── */

.uses-card {
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px 22px;
}

.uses-card h3 {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 14px;
}

.uses-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}

.use-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-secondary);
}

.use-item i {
  color: #16a34a;
  font-size: 14px;
  flex-shrink: 0;
}

/* ── Bottom CTA ── */

.bottom-cta {
  text-align: center;
  padding: 32px 28px;
  background: var(--primary-light);
  border: 0.5px solid rgba(255, 106, 61, 0.15);
  border-radius: var(--radius-card);
  margin-bottom: 40px;
}

.bottom-cta h2 {
  font-size: 18px;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 6px;
}

.bottom-cta p {
  font-size: 13px;
  color: var(--primary);
  opacity: 0.8;
  margin-bottom: 16px;
}

.btn-orange {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: white;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}

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

/* ── Footer ── */

footer {
  border-top: 0.5px solid var(--border);
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Responsive ── */

@media (max-width: 640px) {
  .hero h1 {
    font-size: 24px;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .uses-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    gap: 12px;
    font-size: 12px;
  }
  .nav-links span {
    display: none;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
