@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@700;900&display=swap');

:root {
  --background: #050505;
  --foreground: #ffffff;
  --card: #0a0a0a;
  --muted: #94a3b8;
  --accent: #3b82f6;
  --accent-glow: #22d3ee;
  --border: rgba(255, 255, 255, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: 'Space Grotesk', sans-serif;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(2.5rem, 8vw, 6rem);
}

h2 {
  font-size: clamp(2rem, 6vw, 4rem);
}

h3 {
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-title {
  text-align: center;
  margin-bottom: 80px;
}

.section-title h2 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  margin-bottom: 24px;
}

.section-title p {
  color: var(--muted);
  max-width: 850px;
  margin: auto;
}

.text-muted {
  color: var(--muted);
}

.bg-card {
  background: var(--card);
}

.glass {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
}

/* Navbar specific styles */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 24px 0;
  transition: .3s;
}

nav.scrolled {
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-links {
  display: flex;
  gap: 40px;
  align-items: center;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: .3s;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.nav-links a:hover {
  color: var(--foreground);
}

.mobile-toggle {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  color: white;
}

/* BENTO GRID */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: 24px;
}

.bento-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.bento-item:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

/* WORKFLOW CATALOG */
.workflow-card {
  position: relative;
  overflow: hidden;
  height: 100%;
}

.workflow-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.05), transparent 70%);
  pointer-events: none;
}

.workflow-card:hover {
  transform: translateY(-10px);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.5);
}

.workflow-card i {
  transition: transform 0.3s ease;
}

.workflow-card:hover i[data-lucide] {
  transform: scale(1.1);
}

.workflow-card select,
.workflow-card input {
  appearance: none;
  cursor: pointer;
}

.workflow-card select:focus,
.workflow-card input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.workflow-card [title] {
  transition: .3s;
}

.workflow-card [title]:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

/* Toggle Animations */
.workflow-card .bg-accent {
  animation: glow-pulse 2s infinite;
}

@keyframes glow-pulse {
  0% {
    box-shadow: 0 0 5px rgba(59, 130, 246, 0.5);
  }

  50% {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.8);
  }

  100% {
    box-shadow: 0 0 5px rgba(59, 130, 246, 0.5);
  }
}

.bg-dark {
  background: #050505;
}

.bento-item i {
  color: var(--accent);
  margin-bottom: 32px;
}

.bento-item h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.bento-item.col-span-2 {
  grid-column: span 2;
}

.bento-item.row-span-2 {
  grid-row: span 2;
}

@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, 2fr);
  }
}

@media (max-width: 767px) {
  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .bento-item.col-span-2 {
    grid-column: span 1;
  }

  .bento-item {
    padding: 30px 24px;
  }
}

/* TABLE ROI */
.roi-table {
  width: 100%;
  text-align: left;
  border-collapse: collapse;
  background: var(--card);
  border-radius: 32px;
  overflow: hidden;
  margin-top: 40px;
  border: 1px solid var(--border);
}

.roi-table th {
  padding: 32px;
  background: rgba(255, 255, 255, 0.03);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

.roi-table td {
  padding: 32px;
  border-top: 1px solid var(--border);
}

/* PRICING */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

.price-card {
  background: linear-gradient(180deg, #0a0a0a, #050505);
  padding: 48px;
  border-radius: 40px;
  border: 1px solid var(--border);
  text-align: center;
  transition: .4s;
}

.price-card.featured {
  border-color: var(--accent);
  position: relative;
  box-shadow: 0 0 50px rgba(59, 130, 246, 0.1);
}

/* FAQ */
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  margin-bottom: 20px;
  overflow: hidden;
  transition: .3s;
}

.faq-item:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.faq-item summary {
  padding: 28px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-content {
  padding: 0 28px 28px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--background);
    padding: 40px 24px;
    flex-direction: column;
    border-bottom: 1px solid var(--border);
    gap: 24px;
  }

  .nav-links.active {
    display: flex;
  }

  .mobile-toggle {
    display: block;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .bento-item.col-span-2 {
    grid-column: span 1;
  }
}

.cta-button {
  background: white;
  color: black;
  padding: 14px 32px;
  border-radius: 99px;
  font-weight: 700;
  text-decoration: none;
  transition: .3s;
  display: inline-block;
}

.cta-button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.animate-fade-in-down {
  animation: fade-in-down 0.8s ease-out forwards;
}

.animate-fade-in-up {
  animation: fade-in-up 0.8s ease-out forwards;
  opacity: 0;
}

.animation-delay-200 {
  animation-delay: 0.2s;
}

.animation-delay-400 {
  animation-delay: 0.4s;
}

.animation-delay-600 {
  animation-delay: 0.6s;
}

.animation-delay-800 {
  animation-delay: 0.8s;
}

@keyframes fade-in-down {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* WORKFLOW NODES (n8n style) */
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  position: relative;
  padding: 40px;
}

@media (max-width: 768px) {
  .workflow-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }
}

.workflow-node {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 2;
}

.workflow-node.active {
  border-color: #22c55e;
  box-shadow: 0 0 30px rgba(34, 197, 94, 0.3);
  transform: scale(1.05);
}

.workflow-node i {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--muted);
  transition: 0.3s;
}

.workflow-node.active i {
  color: #22c55e;
}

.workflow-node h4 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.node-status {
  position: absolute;
  bottom: -5px;
  right: -5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #333;
  border: 2px solid var(--background);
}

.workflow-node.active .node-status {
  background: #4ade80;
  box-shadow: 0 0 10px #4ade80;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.5);
    opacity: 0.5;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* CHATBOT UI */
.chatbot-trigger {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 64px;
  height: 64px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 40px rgba(59, 130, 246, 0.4);
  z-index: 1000;
  transition: 0.3s;
}

.chatbot-trigger:hover {
  transform: scale(1.1) rotate(5deg);
}

@media (max-width: 640px) {
  .chatbot-trigger {
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
  }

  .chat-window {
    bottom: 90px;
    right: 20px;
    left: 20px;
    width: auto;
  }
}

.chat-window {
  position: fixed;
  bottom: 110px;
  right: 32px;
  width: min(400px, calc(100vw - 64px));
  height: min(600px, calc(100vh - 160px));
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 24px;
  display: none;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5);
}

.chat-header {
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-input-area {
  padding: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
}

.chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  color: white;
  outline: none;
}

.chat-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  max-width: 85%;
  font-size: 0.95rem;
}

.bubble-ai {
  background: rgba(255, 255, 255, 0.05);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.bubble-user {
  background: var(--accent);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.suggest-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  padding: 6px 14px;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
  transition: 0.3s;
  white-space: nowrap;
}

.suggest-chip:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  transform: translateY(-2px);
}