/* Refuel Robotics - Modern Design System */
/* CSS Variables for consistent theming */
:root {
  /* Brand Colors */
  --primary-dark: #1a2332;
  --primary-blue: #2c3e50;
  --accent-blue: #3498db;
  --success-green: #27ae60;
  --warning-orange: #f39c12;
  
  /* Gradients */
  --hero-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --card-gradient: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
  --tech-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  
  /* Neutral Colors */
  --white: #ffffff;
  --light-gray: #f8f9fa;
  --medium-gray: #e9ecef;
  --dark-gray: #6c757d;
  --text-dark: #2c3e50;
  --text-light: #7f8c8d;
  
  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  /* Spacing Scale */
  --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 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.1);
  
  /* Animation */
  --transition-fast: 0.15s ease-in-out;
  --transition-normal: 0.3s ease-in-out;
  --transition-slow: 0.5s ease-in-out;
}

/* Reset and Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
}

body, h1, h2, h3, h4, h5, h6, p, ul, ol, li {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  font-weight: var(--font-weight-normal);
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--light-gray);
  font-size: 16px;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography System */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }

.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

/* Layout Components */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-sm {
  max-width: 640px;
}

.container-lg {
  max-width: 1400px;
}

/* Header Styles */
.site-header {
  background: var(--hero-gradient);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

/* Gas pump on left side */
.site-header::after {
  content: '';
  position: absolute;
  left: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: 80px;
  height: 120px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 120" fill="rgba(255,255,255,0.1)"><rect x="15" y="20" width="35" height="50" rx="5" fill="currentColor"/><rect x="20" y="25" width="25" height="8" rx="2" fill="rgba(255,255,255,0.2)"/><rect x="20" y="40" width="25" height="15" rx="3" fill="rgba(255,255,255,0.15)"/><circle cx="32.5" cy="47.5" r="5" fill="rgba(255,255,255,0.3)"/><rect x="50" y="30" width="8" height="25" rx="2" fill="currentColor"/><path d="M58 35 L68 25 L70 27 L65 32 L70 37 L68 39 L58 35" fill="currentColor"/><rect x="10" y="70" width="45" height="40" rx="3" fill="currentColor"/><rect x="15" y="75" width="35" height="5" rx="1" fill="rgba(255,255,255,0.2)"/></svg>') no-repeat center;
  background-size: contain;
  opacity: 0.08;
  z-index: 1;
}

/* EV charger on right side */
.site-header .ev-charger {
  content: '';
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: 70px;
  height: 110px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70 110" fill="rgba(255,255,255,0.1)"><rect x="15" y="15" width="30" height="45" rx="6" fill="currentColor"/><rect x="20" y="20" width="20" height="6" rx="2" fill="rgba(255,255,255,0.2)"/><rect x="20" y="30" width="20" height="12" rx="3" fill="rgba(255,255,255,0.15)"/><circle cx="30" cy="36" r="4" fill="rgba(255,255,255,0.3)"/><rect x="25" y="46" width="10" height="3" rx="1" fill="rgba(255,255,255,0.2)"/><path d="M35 60 Q40 65 35 70 Q30 65 35 60" fill="currentColor"/><path d="M45 65 L50 60 L55 65 L50 70 Z" fill="currentColor"/><rect x="10" y="75" width="40" height="25" rx="4" fill="currentColor"/><rect x="15" y="80" width="30" height="4" rx="1" fill="rgba(255,255,255,0.2)"/><rect x="15" y="88" width="15" height="2" rx="1" fill="rgba(255,255,255,0.15)"/><rect x="32" y="88" width="13" height="2" rx="1" fill="rgba(255,255,255,0.15)"/></svg>') no-repeat center;
  background-size: contain;
  opacity: 0.08;
  z-index: 1;
}

/* Add EV charger using a pseudo-element on header-content */
.header-content::after {
  content: '';
  position: absolute;
  right: -200px;
  top: 50%;
  transform: translateY(-50%);
  width: 70px;
  height: 110px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70 110" fill="rgba(255,255,255,0.1)"><rect x="15" y="15" width="30" height="45" rx="6" fill="currentColor"/><rect x="20" y="20" width="20" height="6" rx="2" fill="rgba(255,255,255,0.2)"/><rect x="20" y="30" width="20" height="12" rx="3" fill="rgba(255,255,255,0.15)"/><circle cx="30" cy="36" r="4" fill="rgba(255,255,255,0.3)"/><rect x="25" y="46" width="10" height="3" rx="1" fill="rgba(255,255,255,0.2)"/><path d="M35 60 Q40 65 35 70 Q30 65 35 60" fill="currentColor"/><path d="M45 65 L50 60 L55 65 L50 70 Z" fill="currentColor"/><rect x="10" y="75" width="40" height="25" rx="4" fill="currentColor"/><rect x="15" y="80" width="30" height="4" rx="1" fill="rgba(255,255,255,0.2)"/><rect x="15" y="88" width="15" height="2" rx="1" fill="rgba(255,255,255,0.15)"/><rect x="32" y="88" width="13" height="2" rx="1" fill="rgba(255,255,255,0.15)"/></svg>') no-repeat center;
  background-size: contain;
  opacity: 0.08;
  z-index: 1;
}

.header-content {
  position: relative;
  z-index: 1;
  padding: var(--space-lg) 0;
  text-align: center;
}

.site-title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-sm);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.site-tagline {
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
  opacity: 0.9;
  font-weight: var(--font-weight-medium);
}

/* Navigation Styles */
.main-nav {
  background: var(--primary-blue);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.nav-container {
  display: flex;
  justify-content: center;
  padding: var(--space-md) 0;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: var(--space-sm);
  flex-wrap: wrap;
  justify-content: center;
}

/* Simplified tabs: remove shimmer, transforms, and heavy shadows */
.nav-link {
  color: var(--white);
  text-decoration: none;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-weight: var(--font-weight-medium);
  transition: background-color var(--transition-fast), color var(--transition-fast);
  position: relative;
}

/* Disable animated sheen */
.nav-link::before {
  content: none;
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  transform: none;
}

.nav-link.active {
  background-color: var(--accent-blue);
  box-shadow: none;
}

/* Card System */
.card {
  background: var(--card-gradient);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

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

.card-hero {
  background: var(--tech-gradient);
  color: var(--white);
  text-align: center;
  padding: var(--space-2xl);
  position: relative;
  overflow: hidden;
}

.card-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 2px,
    rgba(255,255,255,0.1) 2px,
    rgba(255,255,255,0.1) 4px
  );
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%) translateY(-100%); }
  100% { transform: translateX(100%) translateY(100%); }
}

/* Content Typography */
.content-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: var(--font-weight-bold);
  color: var(--text-dark);
  margin-bottom: var(--space-lg);
  line-height: 1.2;
}

.section-title {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: var(--font-weight-semibold);
  color: var(--primary-blue);
  margin: var(--space-xl) 0 var(--space-md) 0;
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--accent-blue);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent-blue);
  border-radius: 2px;
}

/* Highlight Boxes */
.highlight-box {
  background: var(--medium-gray);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  margin: var(--space-lg) 0;
  border-left: 4px solid var(--accent-blue);
  position: relative;
  overflow: hidden;
}

.highlight-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--accent-blue), var(--success-green));
}

.mission-statement {
  background: linear-gradient(135deg, #667eea20, #764ba220);
  border-color: var(--accent-blue);
}

.tech-highlight {
  background: linear-gradient(135deg, #27ae6020, #2ecc7120);
  border-color: var(--success-green);
}

.market-highlight {
  background: linear-gradient(135deg, #f39c1220, #e67e2220);
  border-color: var(--warning-orange);
}

/* Progress Indicators */
.progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}

.progress-item {
  background: var(--white);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border-left: 4px solid transparent;
  transition: all var(--transition-normal);
  position: relative;
}

.progress-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.progress-item.completed {
  border-left-color: var(--success-green);
  background: linear-gradient(135deg, #27ae6010, #ffffff);
}

.progress-item.in-progress {
  border-left-color: var(--warning-orange);
  background: linear-gradient(135deg, #f39c1210, #ffffff);
}

.progress-icon {
  font-size: 1.2rem;
  margin-right: var(--space-sm);
  display: inline-block;
}

/* Video Grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-xl);
  margin: var(--space-xl) 0;
}

.video-item {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-normal);
}

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

.video-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  background: var(--medium-gray);
  overflow: hidden;
}

.video-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--medium-gray), var(--light-gray));
  color: var(--dark-gray);
  font-weight: var(--font-weight-medium);
  text-align: center;
  font-style: italic;
}

.video-info {
  padding: var(--space-lg);
}

.video-title {
  font-size: 1.1rem;
  font-weight: var(--font-weight-semibold);
  color: var(--text-dark);
  margin-bottom: var(--space-sm);
}

.video-description {
  font-size: 0.9rem;
  color: var(--dark-gray);
  line-height: 1.5;
}

/* Lists */
.styled-list {
  list-style: none;
  padding: 0;
}

.styled-list li {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--medium-gray);
  position: relative;
  padding-left: var(--space-lg);
}

.styled-list li:last-child {
  border-bottom: none;
}

.styled-list li::before {
  content: '▶';
  position: absolute;
  left: 0;
  color: var(--accent-blue);
  font-weight: var(--font-weight-bold);
}

/* Buttons and CTAs */
.btn {
  display: inline-block;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: var(--font-weight-semibold);
  transition: all var(--transition-normal);
  border: none;
  cursor: pointer;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent-blue);
  color: var(--white);
}

.btn-primary:hover {
  background: #2980b9;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.btn-secondary:hover {
  background: var(--accent-blue);
  color: var(--white);
}

/* Footer */
.site-footer {
  background: var(--primary-dark);
  color: var(--white);
  text-align: center;
  padding: var(--space-xl) 0;
  margin-top: var(--space-3xl);
}

.footer-content {
  font-style: italic;
  opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
  :root {
    --space-md: 0.75rem;
    --space-lg: 1rem;
    --space-xl: 1.5rem;
    --space-2xl: 2rem;
  }
  
  .container {
    padding: 0 var(--space-md);
  }
  
  .site-title {
    font-size: 1.8rem;
  }
  
  .site-tagline {
    font-size: 1rem;
  }
  
  .nav-list {
    gap: var(--space-xs);
  }
  
  .nav-link {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.9rem;
    -webkit-tap-highlight-color: transparent;
  }
  
  .card-content {
    padding: var(--space-lg);
  }
  
  .card-hero {
    padding: var(--space-xl);
  }
  
  .card-hero h1 {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  .card-hero p {
    font-size: 1rem;
    line-height: 1.5;
  }
  
  .video-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  
  .progress-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  
  .tech-stack-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  
  .tech-item {
    padding: var(--space-md);
  }
  
  .tech-item h3 {
    font-size: 1.1rem;
  }
  
  .tech-item p {
    font-size: 0.9rem;
  }
  
  /* Touch-friendly buttons */
  .btn {
    min-height: 44px;
    padding: var(--space-md) var(--space-lg);
  }
  
  /* Better spacing for mobile */
  .main-content {
    padding: var(--space-lg) 0;
  }
  
  .card {
    margin-bottom: var(--space-lg);
  }
}

@media (max-width: 480px) {
  .header-content {
    padding: var(--space-md) 0;
  }
  
  .site-title {
    font-size: 1.5rem;
  }
  
  .site-tagline {
    font-size: 0.9rem;
  }
  
  .nav-container {
    padding: var(--space-sm) 0;
  }
  
  .nav-list {
    justify-content: space-around;
    width: 100%;
  }
  
  .nav-link {
    flex: 1;
    text-align: center;
    padding: var(--space-sm);
    font-size: 0.8rem;
    -webkit-tap-highlight-color: transparent;
  }
  
  .card-hero h1 {
    font-size: 1.8rem;
  }
  
  .card-hero p {
    font-size: 0.9rem;
  }
  
  .card-content {
    padding: var(--space-md);
  }
  
  .tech-item {
    padding: var(--space-sm);
  }
  
  .tech-item h3 {
    font-size: 1rem;
  }
  
  .tech-item p {
    font-size: 0.85rem;
  }
  
  .btn {
    min-height: 48px;
    padding: var(--space-md);
    font-size: 0.9rem;
  }
}

/* Print Styles */
@media print {
  .main-nav,
  .site-footer {
    display: none;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
  
  .card:hover {
    transform: none;
  }
}

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

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

/* Touch-friendly improvements */
.nav-link,
.btn,
.card {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Active states for touch devices */
@media (hover: none) and (pointer: coarse) {
  .nav-link:active,
  .btn:active {
    transform: scale(0.98);
  }
  
  .card:active {
    transform: scale(0.99);
  }
}

/* Loading animation */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

/* Canvas Container */
.canvas-container {
  align-self: center;
  object-fit: cover;
  top: 0px;
  width: 100%;
  background-color: rgba(0, 0, 0, 1);
  height: auto;
  margin: var(--space-xl) 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

#tech-canvas {
  aspect-ratio: auto 1280 / 645;
  display: inline-block;
  height: 100%;
  overflow-clip-margin: content-box;
  overflow-x: clip;
  overflow-y: clip;
  transform-origin: 0px 0px;
  width: 100%;
  max-width: 100%;
}

/* Content editable styles */
[contenteditable="true"] {
  outline: 2px dashed transparent;
  transition: outline var(--transition-normal);
}

[contenteditable="true"]:focus {
  outline-color: var(--accent-blue);
  background: rgba(52, 152, 219, 0.05);
}
