/* =============================================================================
   HALEX — HAL 9000 Theme
   Colors: Space Black, HAL Red, Electric Blue, Warm White, Emerald
   ============================================================================= */

:root {
  --bg-primary: #0B0F14;
  --bg-secondary: #0d1117;
  --bg-tertiary: #151a22;
  --fg-primary: #F5F7FA;
  --fg-muted: #9FB2C3;
  --fg-subtle: #6B7D91;
  --accent-red: #D70000;
  --accent-blue: #00D1FF;
  --accent-green: #00C27A;
  --border-primary: #1c222b;
  --border-secondary: #223041;
}

/* =============================================================================
   Reset & Base Styles
   ============================================================================= */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--fg-primary);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', 'Inter', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--fg-primary);
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

/* Focus states for accessibility */
:focus-visible {
  outline: 2px solid var(--accent-red);
  outline-offset: 2px;
}

/* =============================================================================
   Layout Components
   ============================================================================= */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =============================================================================
   Navigation
   ============================================================================= */

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-primary);
  background: var(--bg-primary);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--fg-primary);
  font-family: 'Poppins', sans-serif;
}

.logo-icon {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
  border-radius: 50%;
  filter: drop-shadow(0 0 8px rgba(215, 0, 0, 0.5));
  transition: filter 0.3s ease;
  object-fit: cover;
}

.logo-icon:hover {
  filter: drop-shadow(0 0 12px rgba(215, 0, 0, 0.7));
}

.nav nav {
  display: flex;
  gap: 24px;
}

.nav a {
  color: var(--fg-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

@media (max-width: 640px) {
  .nav {
    padding: 12px 16px;
  }

  .nav nav {
    gap: 12px;
  }

  .nav a {
    font-size: 13px;
  }
}

/* =============================================================================
   Hero Section
   ============================================================================= */

.hero {
  padding: 40px 24px 60px;
  text-align: center;
  background: transparent;
  position: relative;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--fg-primary) 0%, var(--accent-red) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  max-width: 760px;
  margin: 0 auto 40px;
  font-size: clamp(20px, 2.5vw, 28px);
  color: var(--fg-muted);
  line-height: 1.5;
}

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

.cta-group.center {
  margin-top: 24px;
}

@media (max-width: 640px) {
  .hero {
    padding: 80px 16px 64px;
  }
}

/* =============================================================================
   Buttons
   ============================================================================= */

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 12px;
  border: 1px solid var(--border-primary);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn.primary {
  background: var(--accent-blue);
  color: #001018;
  border-color: transparent;
}

.btn.primary:hover {
  background: #00b8e6;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 209, 255, 0.3);
}

.btn.ghost {
  background: transparent;
  color: var(--fg-primary);
  border-color: var(--border-secondary);
}

.btn.ghost:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

/* =============================================================================
   Section Styles
   ============================================================================= */

.section-title {
  font-size: clamp(28px, 4vw, 36px);
  text-align: center;
  margin-bottom: 16px;
}

.section-subtitle {
  text-align: center;
  color: var(--fg-muted);
  font-size: 18px;
  margin-bottom: 48px;
}

/* =============================================================================
   Offres Section
   ============================================================================= */

.section-offres {
  padding: 80px 24px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  border: 1px solid var(--border-tertiary);
  border-radius: 16px;
  padding: 32px 24px;
  background: linear-gradient(180deg, var(--bg-secondary), var(--bg-primary));
  transition: all 0.3s ease;
}

.card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 209, 255, 0.15);
}

.card-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.card h3 {
  font-size: 22px;
  margin-bottom: 12px;
  color: var(--accent-blue);
}

.card p {
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.6;
}

/* =============================================================================
   Demo Section
   ============================================================================= */

.section-demo {
  padding: 80px 24px;
  background: var(--bg-secondary);
}

.demo-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.demo-text h2 {
  font-size: clamp(24px, 4vw, 32px);
  margin-bottom: 12px;
}

.demo-subtitle {
  color: var(--fg-muted);
  font-size: 18px;
  margin-bottom: 24px;
}

.demo-features {
  list-style: none;
  margin-bottom: 24px;
}

.demo-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--fg-muted);
  line-height: 1.5;
}

.feature-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.demo-credit {
  color: var(--fg-subtle);
  font-size: 14px;
  text-align: center;
  margin-top: 16px;
}

.demo-credit a {
  color: var(--accent-blue);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.demo-credit a:hover {
  opacity: 0.8;
}

.demo-visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.placeholder-image {
  width: 100%;
  aspect-ratio: 4/3;
  border: 2px dashed var(--border-secondary);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  background: var(--bg-primary);
  font-size: 48px;
}

.placeholder-image small {
  font-size: 14px;
  color: var(--fg-subtle);
}

.demo-image {
  width: 100%;
  max-width: 350px;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.demo-image:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 48px rgba(0, 209, 255, 0.2);
}

.leobotics-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--accent-blue);
  transition: opacity 0.2s ease;
}

.leobotics-link:hover {
  opacity: 0.8;
}

.leobotics-logo {
  height: 24px;
  width: auto;
  border-radius: 4px;
  vertical-align: middle;
  margin: 0;
}

.leobotics-logo-large {
  height: 60px;
  width: auto;
  border-radius: 8px;
  vertical-align: middle;
  margin: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.leobotics-logo-large:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

@media (max-width: 768px) {
  .demo-content {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .demo-image {
    max-width: 100%;
  }
}

/* =============================================================================
   Portfolio Section
   ============================================================================= */

.section-portfolio {
  padding: 80px 24px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.portfolio-tile {
  display: block;
  padding: 32px 24px;
  border: 1px dashed var(--border-secondary);
  border-radius: 16px;
  background: var(--bg-secondary);
  color: var(--fg-primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

.portfolio-tile:hover {
  border-style: solid;
  border-color: var(--accent-green);
  background: var(--bg-tertiary);
  transform: translateY(-4px);
}

.tile-icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.portfolio-tile h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--accent-green);
}

.portfolio-tile p {
  color: var(--fg-muted);
  font-size: 14px;
}

/* =============================================================================
   Methode Section
   ============================================================================= */

.section-methode {
  padding: 80px 24px;
  background: var(--bg-secondary);
}

.steps {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.step {
  text-align: center;
  flex: 1;
  min-width: 160px;
  max-width: 220px;
}

.step-number {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-red), var(--accent-blue));
  font-size: 28px;
  font-weight: 700;
  color: var(--bg-primary);
}

.step h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--accent-blue);
}

.step p {
  color: var(--fg-muted);
  font-size: 14px;
}

.step-arrow {
  font-size: 32px;
  color: var(--fg-subtle);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .step-arrow {
    display: none;
  }

  .steps {
    flex-direction: column;
    gap: 32px;
  }
}

/* =============================================================================
   About Section
   ============================================================================= */

.section-about {
  padding: 80px 24px;
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-text p {
  font-size: 18px;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-bottom: 32px;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.skill-tag {
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-secondary);
  border-radius: 24px;
  font-size: 14px;
  color: var(--fg-primary);
  font-weight: 500;
}

/* =============================================================================
   Contact Section
   ============================================================================= */

.section-contact {
  padding: 80px 24px;
  background: var(--bg-secondary);
}

.contact-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  max-width: 1000px;
  margin: 0 auto 32px;
}

.contact-item {
  text-align: center;
  padding: 24px;
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
  border-radius: 16px;
  transition: all 0.3s ease;
}

.contact-item:hover {
  border-color: var(--accent-blue);
  transform: translateY(-4px);
}

.contact-icon {
  font-size: 48px;
  margin-bottom: 16px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-icon-img {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  display: block !important;
  object-fit: contain !important;
}

.contact-item h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--fg-primary);
}

.contact-item a {
  color: var(--accent-blue);
  font-size: 16px;
  font-weight: 500;
}

.contact-note {
  text-align: center;
  color: var(--fg-subtle);
  font-size: 14px;
  font-style: italic;
}

/* =============================================================================
   Footer
   ============================================================================= */

.footer {
  padding: 32px 24px;
  border-top: 1px solid var(--border-primary);
  background: var(--bg-primary);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 16px;
}

.footer p {
  color: var(--fg-muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--fg-muted);
  font-size: 14px;
  transition: color 0.2s ease;
}

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

@media (max-width: 640px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

/* =============================================================================
   Performance & Accessibility
   ============================================================================= */

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

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --fg-muted: #D0D7E0;
    --border-primary: #3a4452;
  }
}
