/* CSS Variables */
:root {
  /* Colors */
  --primary: #1B2A41;
  --secondary: #F0F2F5;
  --accent-primary: #00C9DD;
  --accent-secondary: #FF8C42;
  --text-light: #EFEFEF;
  --text-dark: #333333;
  --text-muted: #6B7280;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--accent-primary), #0EA5E9);
  --gradient-secondary: linear-gradient(135deg, var(--accent-secondary), #F59E0B);
  --gradient-dark: linear-gradient(135deg, var(--primary), #1E293B);
  
  /* Typography */
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-code: 'Fira Code', monospace;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Transitions */
  --transition-fast: 0.15s ease-in-out;
  --transition-normal: 0.3s ease-in-out;
  --transition-slow: 0.5s ease-in-out;
  
  /* Container */
  --container-max-width: 1400px;
}

/* Prevent horizontal scroll globally */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

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

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--primary);
  color: var(--text-light);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Ensure viewport constraints */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}

.header {
  max-width: 100vw;
  box-sizing: border-box;
}

/* Container */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  width: 100%;
}

/* Full-width container for sections that need more space */
.container-wide {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  width: 100%;
}

/* Fluid container that uses most of the screen */
.container-fluid {
  max-width: 95%;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  width: 100%;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: var(--space-md);
  color: rgba(239, 239, 239, 0.8);
}

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.btn-primary::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 var(--transition-slow);
}

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

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

.btn-secondary:hover {
  background: var(--accent-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-large {
  padding: var(--space-md) var(--space-xl);
  font-size: 1.1rem;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(27, 42, 65, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav {
  padding: 8px 0;
  width: 100%;
  box-sizing: border-box;
  min-height: 60px;
}

.nav-container {
  max-width: var(--container-max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--accent-primary);
  font-weight: 700;
  font-size: 1.5rem;
}

.nav-brand {
  font-family: var(--font-heading);
  color: var(--accent-primary);
  font-weight: 600;
}

.nav-menu {
  display: flex;
  gap: var(--space-xl);
}

/* Hide mobile actions on desktop */
.nav-mobile-actions {
  display: none;
}

/* Mobile Navigation - Final Fix */
@media (max-width: 1024px) {
  .nav-menu {
    position: fixed !important;
    top: 60px !important;
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    background-color: var(--primary) !important;
    z-index: 1000 !important;
    padding: 20px !important;
    display: none !important;
    flex-direction: column !important;
    gap: 15px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
  }
  
  .nav-menu.active {
    display: flex !important;
  }
  
  .nav-menu .nav-link {
    color: white !important;
    padding: 12px 0 !important;
    font-size: 16px !important;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    display: block !important;
  }
  
  .nav-mobile-actions {
    margin-top: 20px !important;
    padding-top: 20px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  }
  
  .nav-mobile-actions .btn {
    width: 100% !important;
    margin-top: 10px !important;
    text-align: center !important;
  }
  
  /* Hide desktop nav-actions on mobile */
  .nav-actions {
    display: none !important;
  }
  
  /* Show burger menu */
  .nav-toggle {
    display: flex !important;
  }
}

/* =================================================================== */
/* ===== DEFINITIVE AND CONSOLIDATED MOBILE NAVIGATION STYLES ====== */
/* =================================================================== */

@media (max-width: 1024px) {

  /* --- 1. Header Layout --- */
  
  /* Set the navigation container to use Flexbox for easy alignment */
  .nav-container {
    display: flex;
    align-items: center; /* Vertically centers the logo and icon */
  }

  /* Hide the desktop-only menu links and action buttons */
  .nav-menu,
  .nav-actions {
    display: none;
  }
  
  /* --- 2. The Hamburger Icon Fix --- */

  .nav-toggle {
    display: flex !important; /* Ensure the button is visible */

    /* CRITICAL FIX: Overrides the global "width: 100%" that was stretching the button. */
    width: auto !important; 
    
    /* THE POSITIONING FIX: Pushes the correctly-sized button to the far right. */
    margin-left: auto;

    /* Reset other properties to prevent conflicts */
    position: static;
    padding: 8px; /* Maintain a good clickable area */
  }

  /* --- 3. Styles for the Active (Opened) Menu --- */
  /* These are your original, correct styles for the popup menu */

  .nav-menu.active {
    display: flex !important;
    position: fixed !important;
    top: 60px !important;
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    background-color: var(--primary) !important;
    z-index: 1000 !important;
    padding: 20px !important;
    flex-direction: column !important;
    gap: 15px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
  }
  
  .nav-menu.active .nav-link {
    color: white !important;
    padding: 12px 0 !important;
    font-size: 16px !important;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    display: block !important;
  }
  
  .nav-mobile-actions {
    margin-top: 20px !important;
    padding-top: 20px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  }
  
  .nav-mobile-actions .btn {
    width: 100% !important;
    margin-top: 10px !important;
    text-align: center !important;
  }
}
.nav-link {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 25px;
  height: 2px;
  background: var(--text-light);
  transition: all var(--transition-fast);
}

/* Compact header for mobile */
@media (max-width: 768px) {
  .header {
    min-height: 60px;
    max-height: 60px;
    display: flex;
    align-items: center;
  }

  .nav {
    width: 100%;
    padding: 0;
  }

  .nav-container {
    height: 60px;
    align-items: center;
  }

  /* Hide all buttons except burger on mobile header */
  .nav-container > .nav-actions,
  .nav-container > .btn,
  .nav-container > .nav-link:not(.nav-brand) {
    display: none;
  }

  /* Ensure burger menu stays within bounds */
  .nav-toggle {
    position: relative;
    right: 5px;
    padding: 8px;
  }
}

/* Main content spacing */
main, 
.hero,
.section {
  margin-top: 60px;
}

@media (max-width: 768px) {
  main,
  .hero,
  .section {
    margin-top: 60px;
    padding-top: var(--space-md);
  }

  .header {
    height: 60px;
  }

  .nav-logo {
    max-width: 200px;
    overflow: hidden;
  }

  .nav-brand {
    font-size: 1rem;
  }

  /* Hide desktop buttons on mobile */
  .header .btn,
  .header .nav-link:not(.nav-brand) {
    display: none;
  }

  /* Show only logo and burger menu */
  .nav-container {
    justify-content: space-between;
    align-items: center;
  }

  /* Adjust burger menu position */
  .nav-toggle {
    margin-left: auto;
    padding-right: 0;
  }
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
}

.particles {
  position: absolute;
  width: 100%;
  height: 100%;
}

.grid-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(0, 201, 221, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 201, 221, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

.hero .container-wide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
  max-width: 1600px;
}

.hero-content {
  z-index: 2;
}

.hero-title {
  margin-bottom: var(--space-lg);
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: var(--space-xl);
  opacity: 0.9;
}

.hero-actions {
  display: flex;
  gap: var(--space-lg);
  margin-bottom: var(--space-3xl);
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: var(--space-xl);
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-primary);
  font-family: var(--font-heading);
}

.stat-label {
  font-size: 0.875rem;
  opacity: 0.7;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.robot-demo {
  position: relative;
  width: 100%;
  max-width: 500px;
}

.robot-container {
  position: relative;
  width: 200px;
  height: 150px;
  margin: 0 auto var(--space-xl);
}

.robot-body {
  width: 120px;
  height: 80px;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: var(--shadow-lg);
}

.robot-sensors {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--space-sm);
}

.robot-sensors::before,
.robot-sensors::after {
  content: '';
  width: 12px;
  height: 12px;
  background: var(--accent-secondary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-secondary);
}

.robot-wheels {
  position: absolute;
  bottom: -10px;
  left: 10px;
  right: 10px;
  height: 20px;
  display: flex;
  justify-content: space-between;
}

.robot-wheels::before,
.robot-wheels::after {
  content: '';
  width: 30px;
  height: 20px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: wheelSpin 2s linear infinite;
}

@keyframes wheelSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.code-preview {
  background: rgba(0, 0, 0, 0.6);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-lang {
  font-family: var(--font-code);
  font-size: 0.875rem;
  color: var(--accent-primary);
}

.code-dots {
  display: flex;
  gap: var(--space-xs);
}

.code-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.code-content {
  font-family: var(--font-code);
  font-size: 0.875rem;
  line-height: 1.6;
}

.code-line {
  display: block;
  margin-bottom: var(--space-xs);
}

.keyword { color: #C792EA; }
.function { color: #82AAFF; }
.method { color: #FFCB6B; }
.number { color: #F78C6C; }

/* Section Styles */
.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-title {
  margin-bottom: var(--space-md);
}

.section-subtitle {
  font-size: 1.1rem;
  opacity: 0.8;
  max-width: 600px;
  margin: 0 auto;
}

/* How It Works Section */
.how-it-works {
  padding: var(--space-3xl) 0;
  background: linear-gradient(135deg, rgba(240, 242, 245, 0.05), rgba(0, 201, 221, 0.05));
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
}

.step-card {
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform var(--transition-normal);
}

.step-card:hover {
  transform: translateY(-5px);
}

.step-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-lg);
}

.step-icon i {
  width: 24px;
  height: 24px;
  color: white;
}

.step-title {
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
  color: var(--text-light);
}

.step-description {
  opacity: 0.8;
  line-height: 1.7;
}

.step-number {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-primary);
  opacity: 0.3;
  font-family: var(--font-heading);
}

/* Plans Teaser Section */
.plans-teaser {
  padding: var(--space-3xl) 0;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
  margin-bottom: var(--space-3xl);
}

.plan-card {
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-normal);
  text-align: center;
}

.plan-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-primary);
}

.plan-card.featured {
  border-color: var(--accent-primary);
  box-shadow: 0 0 30px rgba(0, 201, 221, 0.3);
}

.plan-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-primary);
  color: white;
  padding: var(--space-xs) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
}

.plan-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient-primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-lg);
  box-shadow: var(--shadow-lg);
}

.plan-icon i {
  width: 32px;
  height: 32px;
  color: white;
}

.plan-title {
  font-size: 1.25rem;
  margin-bottom: var(--space-md);
  color: var(--text-light);
}

.plan-description {
  opacity: 0.8;
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

.plan-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-primary);
  font-family: var(--font-heading);
}

.plans-cta {
  text-align: center;
}

/* Features Section */
.features {
  padding: var(--space-3xl) 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.2), rgba(27, 42, 65, 0.1));
}

.features-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xl);
}

.feature-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.feature-item.reverse {
  direction: rtl;
}

.feature-item.reverse > * {
  direction: ltr;
}

.feature-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
}

.feature-content {
  padding: var(--space-lg);
}

.feature-title {
  font-size: 2rem;
  margin-bottom: var(--space-md);
  color: var(--text-light);
}

.feature-description {
  font-size: 1.1rem;
  opacity: 0.8;
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}

.feature-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
  transition: gap var(--transition-fast);
}

.feature-link:hover {
  gap: var(--space-md);
}

.feature-link i {
  width: 16px;
  height: 16px;
}

/* Feature Demos */
.blockly-demo {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  background: rgba(0, 0, 0, 0.3);
  padding: var(--space-xl);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(10px);
}

.block-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.block {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  min-width: 120px;
}

.block-start { background: #4CAF50; color: white; }
.block-move { background: #2196F3; color: white; }
.block-turn { background: #FF9800; color: white; }
.block-end { background: #F44336; color: white; }

.arrow {
  font-size: 2rem;
  color: var(--accent-primary);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.code-container {
  font-family: var(--font-code);
  background: rgba(0, 0, 0, 0.5);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.code-line {
  display: block;
  margin-bottom: var(--space-xs);
  color: var(--text-light);
}

.robot-arm-demo {
  position: relative;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0, 201, 221, 0.1), transparent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.robot-arm {
  position: relative;
  width: 200px;
  height: 200px;
}

.arm-base {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 20px;
  background: var(--text-muted);
  border-radius: var(--radius-sm);
}

.arm-segment {
  position: absolute;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
  transform-origin: bottom center;
}

.segment-1 {
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px;
  height: 80px;
  animation: armMove1 3s ease-in-out infinite;
}

.segment-2 {
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px) rotate(-30deg);
  width: 6px;
  height: 60px;
  animation: armMove2 3s ease-in-out infinite;
}

.arm-gripper {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: var(--accent-secondary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-secondary);
  animation: gripperMove 3s ease-in-out infinite;
}

.target-object {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 20px;
  height: 20px;
  background: var(--accent-secondary);
  border-radius: var(--radius-sm);
  animation: objectPulse 3s ease-in-out infinite;
}

@keyframes armMove1 {
  0%, 100% { transform: translateX(-50%) rotate(45deg); }
  50% { transform: translateX(-50%) rotate(15deg); }
}

@keyframes armMove2 {
  0%, 100% { transform: translateX(-50%) translateY(-20px) rotate(-30deg); }
  50% { transform: translateX(-50%) translateY(-20px) rotate(-60deg); }
}

@keyframes gripperMove {
  0%, 100% { transform: translateX(-50%); }
  50% { transform: translateX(-50%) translate(30px, -20px); }
}

@keyframes objectPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.sim-to-real-demo {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  padding: var(--space-xl);
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(10px);
}

.sim-robot, .real-robot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.screen-frame {
  width: 100px;
  height: 80px;
  background: var(--primary);
  border: 3px solid var(--text-muted);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.virtual-robot {
  width: 60px;
  height: 40px;
  background: var(--gradient-primary);
  border-radius: var(--radius-sm);
  animation: virtualMove 2s ease-in-out infinite;
}

.physical-robot {
  width: 80px;
  height: 50px;
  background: var(--text-muted);
  border-radius: var(--radius-md);
  position: relative;
  animation: physicalMove 2s ease-in-out infinite;
}

.physical-robot::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 4px;
  background: var(--accent-primary);
  border-radius: var(--radius-sm);
}

.connection-line {
  width: 40px;
  height: 2px;
  background: var(--accent-primary);
  position: relative;
  animation: dataFlow 1s linear infinite;
}

.connection-line::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  width: 6px;
  height: 6px;
  background: var(--accent-primary);
  border-radius: 50%;
  animation: dataMove 1s linear infinite;
}

.demo-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

@keyframes virtualMove {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(10px); }
}

@keyframes physicalMove {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(10px); }
}

@keyframes dataFlow {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}

@keyframes dataMove {
  0% { left: 0; }
  100% { left: calc(100% - 6px); }
}

/* CTA Section */
.cta {
  padding: var(--space-3xl) 0;
  background: var(--gradient-dark);
  text-align: center;
}

.cta-content {
  max-width: 600px;
  margin: 0 auto;
}

.cta-title {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
}

.cta-subtitle {
  font-size: 1.25rem;
  opacity: 0.8;
  margin-bottom: var(--space-xl);
}

/* Footer */
.footer {
  background: var(--primary);
  padding: var(--space-3xl) 0 var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--accent-primary);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.footer-brand {
  font-family: var(--font-heading);
}

.footer-description {
  opacity: 0.8;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  gap: var(--space-md);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--text-light);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.social-link:hover {
  background: var(--accent-primary);
  transform: translateY(-2px);
}

.social-link i {
  width: 18px;
  height: 18px;
}

.footer-title {
  color: var(--text-light);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-links a {
  color: rgba(239, 239, 239, 0.8);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-bottom p {
  margin: 0;
  opacity: 0.6;
  font-size: 0.875rem;
}

.footer-company {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.875rem;
  opacity: 0.7;
}

.footer-company p {
  margin: 0;
}

/* ===== RESPONSIVE FOOTER STYLES ===== */
@media (max-width: 768px) {
  /* Mobile Footer Layout */
  .footer {
    padding: 40px 20px 20px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }

  .footer-brand {
    margin-bottom: 20px;
  }

  .footer-logo {
    font-size: 20px;
    justify-content: center;
  }

  .footer-brand p {
    font-size: 14px;
    line-height: 1.6;
    margin: 10px auto;
    max-width: 300px;
  }

  .footer-section h4 {
    font-size: 16px;
    margin-bottom: 15px;
  }

  .footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .footer-links a {
    font-size: 14px;
    padding: 5px 0;
  }

  /* Company info centered on mobile */
  .footer-company {
    font-size: 12px;
    margin-top: 15px;
  }

  /* Footer bottom section */
  .footer-bottom {
    padding: 20px 20px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .footer-bottom p {
    font-size: 12px;
    line-height: 1.6;
    margin-bottom: 10px;
  }

  /* Social icons */
  .footer-social {
    justify-content: center;
    margin-top: 20px;
  }

  .social-link {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  /* Extra small devices */
  .footer {
    padding: 30px 15px 15px;
  }

  .footer-content {
    gap: 25px;
  }

  .footer-description {
    font-size: 13px;
  }

  .footer-section h4 {
    font-size: 15px;
    margin-bottom: 12px;
  }

  .footer-links a {
    font-size: 13px;
  }

  .footer-bottom p {
    font-size: 11px;
  }
}

/* Prevent horizontal scroll on mobile footer */
.footer {
  overflow-x: hidden;
  max-width: 100vw;
  box-sizing: border-box;
}

.footer-content {
  max-width: 100%;
}

/* Legal Pages Styling */
.legal-page {
  padding: var(--space-3xl) 0;
  background: var(--secondary);
  min-height: calc(100vh - 200px);
}

.legal-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.legal-header h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--space-md);
}

.legal-updated {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.legal-content {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  padding: var(--space-3xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.legal-section {
  margin-bottom: var(--space-3xl);
}

.legal-section h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: var(--space-lg);
  border-bottom: 2px solid var(--accent-primary);
  padding-bottom: var(--space-sm);
}

.legal-section h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
  margin: var(--space-lg) 0 var(--space-md) 0;
}

.legal-section p {
  line-height: 1.7;
  margin-bottom: var(--space-md);
  color: var(--text-dark);
}

.legal-section ul {
  margin: var(--space-md) 0;
  padding-left: var(--space-xl);
}

.legal-section li {
  margin-bottom: var(--space-sm);
  line-height: 1.6;
  color: var(--text-dark);
}

.contact-info {
  background: var(--secondary);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  margin-top: var(--space-lg);
}

.contact-info p {
  margin-bottom: var(--space-sm);
}

/* Blog Styling */
.blog-hero {
  background: var(--gradient-dark);
  color: var(--text-light);
  padding: var(--space-3xl) 0;
  text-align: center;
}

.blog-hero-content h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: var(--space-lg);
}

.blog-hero-content p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

.blog-main {
  padding: var(--space-3xl) 0;
  background: var(--secondary);
}

.blog-grid {
  display: grid;
  gap: var(--space-xl);
  margin-bottom: var(--space-3xl);
}

.blog-post {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.blog-post:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.blog-post.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 400px;
}

.post-image {
  position: relative;
  overflow: hidden;
}

.blog-post:not(.featured) .post-image {
  height: 200px;
}

.blog-post.featured .post-image {
  height: 100%;
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.blog-post:hover .post-image img {
  transform: scale(1.05);
}

.post-category {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  background: var(--accent-primary);
  color: white;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.post-content {
  padding: var(--space-xl);
}

.blog-post.featured .post-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-meta {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.post-title {
  margin-bottom: var(--space-md);
}

.blog-post.featured .post-title {
  font-size: 1.8rem;
  line-height: 1.3;
}

.blog-post:not(.featured) .post-title {
  font-size: 1.3rem;
  line-height: 1.4;
}

.post-title a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.post-title a:hover {
  color: var(--accent-primary);
}

.post-excerpt {
  line-height: 1.6;
  color: var(--text-dark);
  margin-bottom: var(--space-lg);
}

.blog-post.featured .post-excerpt {
  font-size: 1.1rem;
}

.post-tags {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.tag {
  background: var(--secondary);
  color: var(--text-muted);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
}

.newsletter-signup {
  background: var(--gradient-primary);
  color: white;
  padding: var(--space-3xl);
  border-radius: var(--radius-xl);
  text-align: center;
}

.newsletter-content h2 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: var(--space-lg);
}

.newsletter-content p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: var(--space-xl);
}

.newsletter-form {
  display: flex;
  gap: var(--space-md);
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: var(--space-md);
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
}

.newsletter-form button {
  white-space: nowrap;
}

/* Community Section */
.community {
  padding: var(--space-3xl) 0;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.community-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.community-text {
  max-width: 500px;
}

.community-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: var(--space-xs);
}

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

.community-form {
  display: flex;
  justify-content: center;
}

.contact-card {
  background: white;
  padding: var(--space-2xl);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 500px;
}

.contact-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: var(--space-sm);
}

.contact-card p {
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
}

.contact-form .form-group {
  margin-bottom: var(--space-lg);
}

.contact-form label {
  display: block;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: var(--space-sm);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: var(--space-md);
  border: 2px solid #e5e7eb;
  border-radius: var(--radius-md);
  font-size: 1rem;
  transition: border-color var(--transition-fast);
  background: white;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 201, 221, 0.1);
}

.contact-form textarea {
  resize: vertical;
  min-height: 100px;
}

.contact-form .btn-full {
  width: 100%;
  justify-content: center;
}

/* Hidden field for Netlify forms */
.hidden {
  display: none !important;
}

/* Global container and overflow fixes */
@media (max-width: 768px) {
  /* Ensure all sections respect viewport width */
  .section,
  section,
  .hero,
  .container,
  .container-wide,
  .container-fluid,
  form,
  .form-container,
  .demo-section,
  .action-section,
  .contact-section,
  footer,
  .footer {
    width: 100% !important;
    max-width: 100vw !important;
    padding-left: var(--space-md) !important;
    padding-right: var(--space-md) !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  /* Fix form elements */
  .form-row {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    width: 100%;
  }
  
  .form-group {
    width: 100%;
    min-width: unset;
  }
  
  input,
  textarea,
  select,
  button,
  .btn {
    max-width: 100% !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }
  
  /* Fix grid layouts */
  .grid,
  .features-grid,
  .benefits-grid {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: var(--space-md) !important;
  }
  
  /* Fix images and media */
  img,
  video,
  iframe {
    max-width: 100% !important;
    height: auto !important;
  }
}

/* Responsive Design for Mobile and Tablets */
@media (max-width: 768px) {
  /* Mobile Navigation */
  .nav-actions {
    position: fixed;
    top: 60px;
    left: -100%;
    width: 70%;
    padding: var(--space-md);
    background: rgba(27, 42, 65, 0.98);
    z-index: 999;
  }

  .nav-actions .btn,
  .nav-actions .nav-link {
    display: none;
  }

  .nav-menu {
    position: fixed;
    top: 60px;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: calc(100vh - 60px);
    background: var(--primary);
    display: flex;
    flex-direction: column;
    padding: var(--space-xl);
    gap: var(--space-lg);
    transition: right var(--transition-normal);
    z-index: 999;
    overflow-y: auto;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .nav-link {
    font-size: 1.1rem;
    padding: var(--space-md) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .nav-toggle {
    display: flex;
    z-index: 1001;
  }
  
  .nav-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .nav-actions .btn {
    padding: var(--space-md);
    font-size: 0.9rem;
    width: 100%;
    text-align: center;
  }
  
  .nav-actions .nav-link {
    text-align: center;
    border-bottom: none;
  }
  
  .nav-container {
    padding: 0 5px;
    max-width: 100vw;
  }
  
  /* Add overlay when menu is active */
  .nav-menu.active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
  }
  
  .legal-content {
    padding: var(--space-xl);
    margin: 0 var(--space-md);
  }
  
  .blog-post.featured {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .blog-post.featured .post-image {
    height: 250px;
  }
  
  .newsletter-form {
    flex-direction: column;
  }
  
  .blog-hero-content h1 {
    font-size: 2rem;
  }
  
  .legal-header h1 {
    font-size: 2rem;
  }
}

/* Additional Mobile Responsiveness */
@media (max-width: 480px) {
  .nav-container {
    padding: 0 var(--space-xs);
  }
  
  .nav-logo {
    font-size: 1rem;
  }
  
  .nav-brand {
    font-size: 1rem;
  }
  
  .nav-toggle {
    margin-right: 0;
  }
  
  .nav-menu {
    width: 80%;
  }
  
  .nav-menu.active::before {
    left: 80%;
    width: 20%;
  }
}

/* Tablet responsiveness */
@media (max-width: 1024px) and (min-width: 769px) {
  .nav-menu {
    gap: var(--space-lg);
  }
  
  .nav-container {
    padding: 0 var(--space-lg);
  }
}

/* Ensure no horizontal scroll */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }
  
  .container,
  .container-wide,
  .container-fluid {
    padding: 0 var(--space-md);
    max-width: 100%;
  }
}

/* Large screen optimizations */
@media (min-width: 1400px) {
  .container-wide {
    padding: 0 var(--space-xl);
  }
  
  .hero .container-wide {
    gap: var(--space-3xl);
  }
  
  .features-grid {
    gap: var(--space-3xl);
  }
  
  .feature-item {
    gap: var(--space-3xl);
  }
}

/* Ultra-wide screen optimizations */
@media (min-width: 1600px) {
  .container-wide {
    max-width: 1800px;
    padding: 0 var(--space-2xl);
  }
  
  .hero .container-wide {
    gap: 4rem;
  }
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Scroll animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Loading states */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles */
.btn:focus,
.nav-link:focus,
.feature-link:focus {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .header,
  .footer,
  .cta {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .hero {
    min-height: auto;
    padding: var(--space-lg) 0;
  }
}  /* Hide Support and Legal sections on mobile */
  .footer-section:nth-child(4),
  .footer-section:nth-child(5) {
    display: none;
  }

/* Hide social media icons on mobile */
@media (max-width: 768px) {
  .footer-social {
    display: none;
  }
}
