/* Datfly Theme System
   Default: Light (Clean, Readable)
   Dark Mode: Midnight Navy (Premium, Data-focused)
*/

:root {
  /* LIGHT MODE (Default) - Premium Palette */
  --bg-page: #FAFBFC;
  --bg-subtle: #F5F7FA;
  --bg-card: #FFFFFF;

  --text-head: #0F172A;
  --text-body: #475569;
  --text-light: #64748B;

  --primary: #4F46E5;
  /* Indigo */
  --primary-hover: #4338CA;
  --primary-subtle: #EEF2FF;

  --accent: #FF6B6B;
  /* Electric Coral */
  --accent-hover: #FF5252;
  --accent-subtle: #FFE5E5;

  --success: #10B981;
  --warning: #F59E0B;

  --border-subtle: #E2E8F0;

  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

  --font-main: "Inter", system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
  /* DARK MODE (Midnight Premium) */
  --bg-page: #0F172A;
  --bg-subtle: #1E293B;
  --bg-card: #1E293B;

  --text-head: #F8FAFC;
  --text-body: #CBD5E1;
  --text-light: #94A3B8;

  --primary: #6366F1;
  /* Lighter indigo for dark mode */
  --primary-hover: #818CF8;
  --primary-subtle: rgba(99, 102, 241, 0.15);

  --accent: #FF6B6B;
  --accent-hover: #FF8787;

  --border-subtle: rgba(255, 255, 255, 0.1);

  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.7);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.8);
}

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

body {
  margin: 0;
  background-color: var(--bg-page);
  color: var(--text-body);
  font-family: var(--font-main);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4 {
  color: var(--text-head);
  margin-top: 0;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-page);
  /* Use variable for dark mode support */
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  font-weight: 800;
  font-size: 2rem;
  color: var(--text-head);
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-body);
}

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

.header-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Theme Toggle Button */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-head);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s;
}

.theme-toggle:hover {
  background-color: var(--bg-subtle);
  transform: rotate(15deg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.4rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: var(--shadow-sm);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover), var(--accent-hover));
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

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

.btn-ghost:hover {
  background-color: var(--bg-subtle);
  color: var(--text-head);
}

.btn-lg {
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
}

/* Hero Section */
.hero {
  padding: 6rem 0;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, var(--primary-subtle) 0%, transparent 60%);
  transition: background 0.3s ease;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  max-width: 700px;
  margin: 0 auto 2.5rem;
  color: var(--text-light);
}

.launch-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-subtle), var(--accent-subtle));
  color: var(--primary);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
  border-radius: 99px;
  margin-bottom: 2rem;
  border: 1px solid var(--primary);
}

/* Diagram Container */
.workflow-visual {
  margin-top: 4rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 3rem;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.flow-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
}

.flow-line {
  position: absolute;
  top: 50%;
  left: 50px;
  right: 50px;
  height: 2px;
  background: var(--border-subtle);
  z-index: 0;
}

.flow-node {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 1.5rem;
  border-radius: 12px;
  width: 28%;
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 1;
  transition: transform 0.2s, background-color 0.3s ease;
}

.flow-node:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
}

.node-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.node-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background-color: var(--bg-subtle);
}

.node-title {
  font-weight: 600;
  color: var(--text-head);
}

.node-detail {
  font-size: 0.85rem;
  color: var(--text-light);
  background: var(--bg-subtle);
  padding: 0.5rem;
  border-radius: 6px;
  margin-top: 0.5rem;
  border-left: 2px solid var(--primary);
}

/* Section Styling */
.section {
  padding: 5rem 0;
}

.section-alt {
  background-color: var(--bg-subtle);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.section-head {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 4rem;
}

.section-head h2 {
  font-size: 2.5rem;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.detail-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.check-icon {
  color: var(--primary);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.detail-content h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
  color: var(--text-head);
}

.detail-content p {
  color: var(--text-light);
  font-size: 0.95rem;
  margin: 0;
}

/* Live Dashboard Mockup */
.dashboard-mock {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  transition: background-color 0.3s ease;
}

.dashboard-row {
  display: flex;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--bg-subtle);
  color: var(--text-body);
}

/* Footer */
.footer {
  padding: 4rem 0;
  text-align: center;
  color: var(--text-light);
  background: var(--bg-page);
  border-top: 1px solid var(--border-subtle);
  transition: background-color 0.3s ease;
}

/* ============================================
   RESPONSIVE DESIGN - Mobile First
   ============================================ */

/* Mobile Base Styles (already defined above) */

/* Small Mobile (max 480px) */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero h1 {
    font-size: 2rem;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }

  .btn-lg {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
  }

  .stats-grid,
  .scale-grid,
  .ai-grid,
  .pricing-grid,
  .company-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .section-head h2 {
    font-size: 1.8rem;
  }

  .logo {
    font-size: 1.5rem;
  }

  .nav {
    display: none;
    /* Hide on very small screens */
  }

  .header-cta {
    gap: 0.5rem;
  }

  .header-cta .btn-ghost {
    display: none;
    /* Hide log in on small mobile */
  }
}

/* Tablet (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .scale-grid,
  .ai-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-grid,
  .company-grid {
    grid-template-columns: 1fr;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }

  .details-right {
    margin-top: 2rem;
  }
}

/* Desktop (769px+) */
@media (min-width: 769px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .scale-grid,
  .ai-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .pricing-grid,
  .company-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Large Desktop (1200px+) */
@media (min-width: 1200px) {
  .container {
    max-width: 1200px;
  }

  .hero h1 {
    font-size: 3.5rem;
  }
}

/* Mobile Menu Toggle */
@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--bg-page);
    flex-direction: column;
    padding: 2rem;
    gap: 2rem;
    transition: left 0.3s ease;
    z-index: 999;
    box-shadow: var(--shadow-lg);
  }

  .nav.active {
    left: 0;
  }

  .nav a {
    font-size: 1.2rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-subtle);
  }

  /* Mobile menu button */
  .mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-head);
  }

  .header-inner {
    justify-content: space-between;
  }
}

/* Desktop - hide mobile menu button */
@media (min-width: 769px) {
  .mobile-menu-toggle {
    display: none;
  }
}

/* Ensure touch targets are large enough on mobile */
@media (max-width: 768px) {

  button,
  a.btn,
  .faq-question {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Improve chatbot on mobile */
@media (max-width: 768px) {
  .chatbot-window {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
    right: 0;
    bottom: 0;
  }

  .chatbot-window.active {
    bottom: 0;
  }

  .chatbot-toggle {
    bottom: 20px;
    right: 20px;
  }
}

/* Scale Section */
.scale-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.scale-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.scale-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-subtle);
}

.icon-box {
  width: 56px;
  height: 56px;
  background-color: var(--primary-subtle);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.icon-box svg {
  width: 28px;
  height: 28px;
  stroke-width: 2;
}

.scale-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-head);
}

.scale-card p {
  font-size: 0.95rem;
  color: var(--text-body);
  line-height: 1.6;
  margin: 0;
}

/* Pricing Section */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 900px;
  margin: 3rem auto 0;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 3rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.pricing-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.pricing-card.featured {
  border: 2px solid transparent;
  background: linear-gradient(white, white) padding-box,
    linear-gradient(135deg, var(--primary), var(--accent)) border-box;
  position: relative;
}

.price {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-head);
  margin: 1.5rem 0 0.5rem;
}

.price-period {
  color: var(--text-light);
  font-size: 0.95rem;
}

.price-badge {
  background: var(--primary);
  color: #fff;
  padding: 0.4rem 1rem;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 1rem;
}

/* Company / Contact Grid */
.company-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 4rem;
}

.company-card {
  background: var(--bg-subtle);
  border-radius: 12px;
  padding: 2.5rem;
  text-align: center;
  border: 1px solid var(--border-subtle);
  transition: background-color 0.2s;
}

.company-card:hover {
  background: var(--bg-page);
  border-color: var(--primary);
}

@media (max-width: 800px) {

  .pricing-grid,
  .company-grid {
    grid-template-columns: 1fr;
  }
}

/* Animations for Dashboard */
@keyframes pulse-dot {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
  }
}

@keyframes grow-bar {
  from {
    width: 0;
  }

  to {
    width: var(--target-width);
  }
}

@keyframes slidein-item {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Live Dashboard Component */
.live-dashboard {
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  overflow: hidden;
}

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-subtle);
  padding: 0.3rem 0.8rem;
  border-radius: 99px;
}

.pulse {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

.dash-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-subtle);
  padding: 1rem;
  border-radius: 10px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-light);
  display: block;
  margin-bottom: 0.4rem;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-head);
}

.chart-area {
  margin-top: 1rem;
}

.chart-bar {
  height: 8px;
  background: var(--bg-subtle);
  border-radius: 4px;
  margin-bottom: 0.8rem;
  position: relative;
  overflow: hidden;
}

.chart-fill {
  background: var(--primary);
  height: 100%;
  border-radius: 4px;
  animation: grow-bar 1.5s ease-out forwards;
}

.activity-feed {
  background: var(--bg-subtle);
  border-radius: 12px;
  padding: 1rem;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.85rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border-subtle);
  animation: slidein-item 0.5s ease-out forwards;
}

.activity-item:last-child {
  border-bottom: none;
}

.user-avatar {
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
}

@media (max-width: 800px) {
  .dash-grid {
    grid-template-columns: 1fr;
  }

  .dash-stats {
    grid-template-columns: 1fr 1fr;
  }
}

/* Product Window Frame - Software Prototype */
.product-window {
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
}

.window-header {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.window-dots {
  display: flex;
  gap: 0.4rem;
}

.window-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-subtle);
}

.window-dot:nth-child(1) {
  background: #FF605C;
}

.window-dot:nth-child(2) {
  background: #FFBD44;
}

.window-dot:nth-child(3) {
  background: #00CA4E;
}

.window-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-body);
  margin-left: 0.5rem;
}

/* Workflow Canvas */
.canvas-area {
  background:
    radial-gradient(circle, var(--border-subtle) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: 0 0;
  padding: 3rem 2rem;
  min-height: 400px;
  position: relative;
  overflow: hidden;
}

/* Workflow Nodes */
.workflow-canvas {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
}

.workflow-node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  z-index: 2;
}

.node-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  position: relative;
}

.node-circle:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.node-circle.active {
  border-color: var(--primary);
  animation: node-glow 2s ease-in-out infinite;
}

.node-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-head);
  text-align: center;
  max-width: 100px;
}

.node-sublabel {
  font-size: 0.75rem;
  color: var(--text-light);
  text-align: center;
}

/* Connection Lines */
.flow-connections {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.flow-line {
  stroke: var(--border-subtle);
  stroke-width: 2;
  fill: none;
  stroke-dasharray: 8, 4;
}

.flow-line.active {
  stroke: var(--primary);
  stroke-width: 2.5;
  animation: flow-dash 20s linear infinite;
}

/* Animations */
@keyframes flow-dash {
  to {
    stroke-dashoffset: -1000;
  }
}

@keyframes node-glow {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
  }

  50% {
    box-shadow: 0 0 20px 5px rgba(37, 99, 235, 0.2);
  }
}

.status-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  background: #00CA4E;
  border-radius: 50%;
  border: 2px solid var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

.status-badge.running {
  background: var(--primary);
  animation: pulse-dot 2s infinite;
}

@media (max-width: 800px) {
  .workflow-canvas {
    flex-direction: column;
    gap: 2rem;
  }

  .flow-line {
    display: none;
  }

  .canvas-area {
    padding: 2rem 1rem;
  }
}

/* Enhanced Workflow Features */
.workflow-branch {
  position: relative;
}

.branch-path {
  stroke: var(--primary);
  stroke-width: 2;
  fill: none;
  stroke-dasharray: 6, 3;
  opacity: 0.6;
}

.conditional-badge {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
}

.conditional-badge.if {
  background: var(--primary);
}

.conditional-badge.then {
  background: var(--success);
}

.data-preview {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.7rem;
  color: var(--text-body);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 10;
}

.workflow-node:hover .data-preview {
  opacity: 1;
}

.node-type-trigger .node-circle {
  border-color: var(--accent);
}

.node-type-action .node-circle {
  border-color: var(--primary);
}

.node-type-condition .node-circle {
  border-color: var(--warning);
  position: relative;
}

.node-type-condition::after {
  content: '?';
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  background: var(--warning);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

/* Premium Animations & Transitions */
@keyframes float {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }

  100% {
    background-position: 1000px 0;
  }
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Enhanced button animations */
.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
      transparent,
      rgba(255, 255, 255, 0.2),
      transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

/* Glass morphism for cards */
.product-window,
.pricing-card,
.scale-card,
.company-card {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.product-window::before,
.workflow-visual::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg,
      rgba(79, 70, 229, 0.05) 0%,
      rgba(255, 107, 107, 0.05) 100%);
  pointer-events: none;
  z-index: 0;
}

.product-window>*,
.workflow-visual>* {
  position: relative;
  z-index: 1;
}

/* Enhanced hover animations */
.workflow-node {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.workflow-node:hover {
  transform: translateY(-4px);
}

.node-circle {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Subtle floating animation for hero */
.hero .animate {
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Premium gradient overlays */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 150%;
  height: 100%;
  background: radial-gradient(ellipse at center,
      rgba(79, 70, 229, 0.1) 0%,
      transparent 70%);
  pointer-events: none;
}

.hero {
  position: relative;
  overflow: hidden;
}

/* Enhanced shadows for depth */
.pricing-card.featured {
  box-shadow:
    0 0 0 1px rgba(79, 70, 229, 0.1),
    0 20px 25px -5px rgba(79, 70, 229, 0.1),
    0 10px 10px -5px rgba(79, 70, 229, 0.04);
}

/* Smooth link transitions */
a {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced scale card interactions */
.scale-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.icon-box {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-card:hover .icon-box {
  transform: scale(1.1) rotate(5deg);
}

/* Gradient text effect */
.hero h1 {
  background: linear-gradient(135deg,
      var(--text-head) 0%,
      var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Premium loading states */
@keyframes skeleton-loading {
  0% {
    background-position: -200px 0;
  }

  100% {
    background-position: calc(200px + 100%) 0;
  }
}

/* Enhanced focus states for accessibility */
.btn:focus-visible,
input:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

/* Hero Animated Graphic */
.hero-graphic {
  width: 100%;
  max-width: 900px;
  margin: 3rem auto 0;
  height: 150px;
  position: relative;
  overflow: hidden;
}

.animated-lines {
  width: 100%;
  height: 100%;
}

.flow-path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawLine 3s ease-out forwards;
}

.path-2 {
  animation-delay: 0.3s;
}

.path-3 {
  animation-delay: 0.6s;
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

.pulse-circle {
  animation: pulseGrow 2s ease-in-out infinite;
}

@keyframes pulseGrow {

  0%,
  100% {
    r: 4;
    opacity: 0.6;
  }

  50% {
    r: 8;
    opacity: 1;
  }
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-item {
  padding: 1.5rem;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.95rem;
  color: var(--text-light);
  font-weight: 500;
}

/* AI Features Section */
.ai-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.ai-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.ai-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.ai-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, var(--primary-subtle), var(--bg-subtle));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

/* Integrations */
.integrations-row {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.integration-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.integration-item:hover {
  opacity: 1;
}

.integration-icon {
  width: 48px;
  height: 48px;
  background: var(--bg-subtle);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* FAQ Accordion Styling */
.faq-item {
  border-bottom: 1px solid var(--border-subtle);
  padding: 0;
  overflow: hidden;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 0;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-head);
  transition: color 0.2s;
}

.faq-question:hover {
  color: var(--primary);
}

.faq-question::after {
  content: '↓';
  font-weight: normal;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-question::after {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  padding-bottom: 0;
}

.faq-item.active .faq-answer {
  max-height: 200px;
  /* Large enough for content */
  opacity: 1;
  padding-bottom: 1.5rem;
}

/* Graphics Enhancements for Sections */
.stats-grid {
  position: relative;
  z-index: 1;
}

.section-bg-graphic {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-dot-pattern {
  background-image: radial-gradient(var(--primary-subtle) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.3;
}

.floating-blob {
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--primary-subtle) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(40px);
  animation: float-around 20s infinite alternate;
}

@keyframes float-around {
  from {
    transform: translate(-10%, -10%);
  }

  to {
    transform: translate(10%, 10%);
  }
}

.ai-grid {
  position: relative;
  z-index: 1;
}

/* AI Neural Graphic */
.neural-lines {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0.1;
  stroke: var(--primary);
  stroke-width: 0.5;
  pointer-events: none;
}

/* Responsive */
@media (max-width: 800px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ai-grid {
    grid-template-columns: 1fr;
  }

  .stat-number {
    font-size: 2.5rem;
  }
}

/* Card Glow & Motion */
.scale-card,
.ai-card,
.pricing-card,
.company-card {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.scale-card:hover,
.ai-card:hover,
.pricing-card:hover,
.company-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(79, 70, 229, 0.15);
  border-color: var(--primary);
}

/* Section Reveal Animation */
.section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.section.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Scale Section Graphics */
#scale {
  position: relative;
  overflow: hidden;
}

#scale .section-bg-graphic {
  background: radial-gradient(circle at 10% 20%, var(--primary-subtle) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, var(--accent-subtle) 0%, transparent 40%);
  opacity: 0.5;
}

.bg-circuit-lines {
  background-image:
    linear-gradient(var(--border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.1;
}

/* Micro-interaction: Animated Button Shine */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: rotate(45deg);
  animation: shine-flow 6s infinite;
}

@keyframes shine-flow {
  0% {
    left: -150%;
    top: -150%;
  }

  20%,
  100% {
    left: 150%;
    top: 150%;
  }
}

/* AI Chatbot Widget */
.chatbot-widget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
}

.chatbot-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: none;
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatbot-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.6);
}

.chatbot-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 380px;
  height: 500px;
  background: var(--bg-card);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.chatbot-window.active {
  display: flex;
}

.chatbot-header {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--bg-subtle);
}

.chatbot-message {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
}

.message-content {
  background: var(--bg-card);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  max-width: 75%;
  line-height: 1.5;
  color: var(--text-body);
  box-shadow: var(--shadow-sm);
}

.user-message {
  flex-direction: row-reverse;
}

.user-message .message-avatar {
  background: var(--primary);
  color: white;
}

.user-message .message-content {
  background: var(--primary);
  color: white;
}

.chatbot-input-area {
  padding: 1rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 0.5rem;
  background: var(--bg-card);
}

.chatbot-input-area input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  font-size: 0.95rem;
  background: var(--bg-subtle);
  color: var(--text-head);
}

.chatbot-send-btn {
  padding: 0.75rem 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

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

@media (max-width: 500px) {
  .chatbot-widget {
    bottom: 1rem;
    right: 1rem;
  }

  .chatbot-window {
    width: calc(100vw - 2rem);
    right: 0;
    bottom: 70px;
  }
}