:root {
  /* Colors - High-Tech Monochrome */
  --bg-primary: #050505;
  --bg-secondary: #0F0F0F;
  --bg-tertiary: #181818;

  --text-primary: #FFFFFF;
  --text-secondary: #A1A1AA;
  --text-muted: #52525B;

  --accent-primary: #F8FAFC;
  /* White/Silver */
  --accent-secondary: #C0C0C0;
  /* Silver */
  --accent-glow: rgba(255, 255, 255, 0.15);

  --border-color: #27272A;

  /* Typography */
  --font-main: 'Inter', sans-serif;
  --font-display: 'Inter', sans-serif;
  /* Could swap for a more tech font if available */

  /* Spacing & Layout */
  --container-width: 1400px;
  --header-height: 80px;
  --border-radius-lg: 32px;
  --border-radius-md: 24px;
  --border-radius-sm: 12px;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  font-size: 16px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Utilities */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section-padding {
  padding: 100px 0;
}

.text-gradient {
  background: linear-gradient(135deg, #FFFFFF, #94A3B8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bento-grid {
  display: grid;
  gap: 20px;
}

.bento-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 40px;
  overflow: hidden;
  position: relative;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.3s;
}

.bento-card:hover {
  border-color: var(--text-secondary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 100px;
  /* Pill shape */
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: #E2E2E2;
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

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

.btn-outline:hover {
  border-color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

/* Navbar - Floating Pill Style */
.navbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  min-width: 400px;
  /* Restored */
  max-width: 90%;
  height: 60px;
  background: rgba(20, 20, 20, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  padding: 5px 20px;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  width: 100%;
  padding: 0;
  gap: 20px;
}

.logo {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.logo img {
  height: 24px;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.8));
}

.nav-links {
  display: flex;
  gap: 5px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: 100px;
  transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

/* CTA Button in Nav */
.nav-cta {
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}


/* Common Hero Styles */
.page-hero {
  padding: 180px 0 60px;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, #1e1e1e 0%, #050505 60%);
}

.page-hero h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  font-weight: 800;
  letter-spacing: -1px;
}

/* Footer */
footer {
  background: var(--bg-primary);
  padding: 80px 0 40px;
  border-top: 1px solid var(--border-color);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-info p {
  color: var(--text-muted);
  margin-top: 20px;
  max-width: 300px;
}

.footer-col h4 {
  color: var(--text-primary);
  margin-bottom: 24px;
  font-size: 1rem;
  font-weight: 600;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul li a {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-col ul li a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.85rem;
}



/* =========================================
   Migrated Styles from index.html
   ========================================= */

/* Modern Hero Bento Grid */
.hero-section {
  padding-top: 120px;
  padding-bottom: 60px;
}

.hero-bento {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 500px 300px;
  gap: 20px;
}

/* Large Main Card */
.hero-main {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
  background: radial-gradient(circle at bottom right, #1a1a1a 0%, #0F0F0F 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 60px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.hero-main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../images/hero_blueprint.png') center/cover no-repeat;
  opacity: 0.4;
  mix-blend-mode: overlay;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 80%;
}

.hero-title {
  font-size: 4rem;
  line-height: 1.1;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -2px;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  font-weight: 400;
}

/* Secondary Top Card - Services */
.hero-secondary-top {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  background: #0F0F0F;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-secondary-top h3 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.service-list-hero li {
  padding: 15px 0;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

/* Secondary Bottom Card - Training CTA */
.hero-secondary-bottom {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
  background: #E2E8F0;
  color: #000;
  border-radius: var(--border-radius-lg);
  padding: 40px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-secondary-bottom h3 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 10px;
  letter-spacing: -1px;
}

.hero-secondary-bottom p {
  margin-bottom: 20px;
  opacity: 0.8;
}

.arrow-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* Stats Strip */
.stats-strip {
  display: flex;
  justify-content: space-evenly;
  margin-top: 60px;
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

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

.stat-block h4 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.stat-block span {
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

/* About Page Styles */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: stretch;
}

.about-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-card h2 {
  font-size: 2.5rem;
  margin-bottom: 30px;
  line-height: 1.1;
  color: var(--text-primary);
}

.about-lead {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.about-text {
  color: var(--text-muted);
  margin-bottom: 40px;
}

.about-image-card {
  background: url('../images/hero_robot.jpg') center/cover;
  border-radius: var(--border-radius-lg);
  opacity: 0.8;
  min-height: 400px;
  border: 1px solid var(--border-color);
}

/* =========================================
   Responsive Design (Mobile & Tablet)
   ========================================= */

/* Tablet & Mobile (max-width: 1024px) */
@media (max-width: 1024px) {
  .container {
    max-width: 100%;
    padding: 0 30px;
  }

  .hero-bento {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .hero-main,
  .hero-secondary-top,
  .hero-secondary-bottom {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .hero-main {
    min-height: 500px;
    padding: 40px;
  }

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

  .hero-title {
    font-size: 3rem;
  }

  .stats-strip {
    padding: 30px 0;
    flex-wrap: wrap;
    gap: 30px;
  }

  .stats-strip .stat-block {
    flex: 1 1 40%;
    margin-right: 0 !important;
  }
}

/* Mobile Devices (max-width: 768px) */
@media (max-width: 768px) {

  /* Prevent horizontal scroll */
  html,
  body {
    overflow-x: hidden;
    width: 100%;
  }

  .container {
    padding: 0 20px;
    width: 100%;
    overflow-x: hidden;
  }

  .bento-card {
    padding: 24px;
    width: 100%;
  }

  /* Optimized Navbar */
  .navbar {
    width: 90%;
    left: 50%;
    min-width: unset;
    justify-content: space-between;
    padding: 10px 20px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: rgba(15, 15, 15, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 30px 20px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 999;
    align-items: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  }

  .nav-links.active {
    display: flex;
  }

  /* Scale Logo for Mobile */
  .logo img {
    transform: scale(0.6);
    transform-origin: left center;
  }

  .nav-links a {
    width: 100%;
    text-align: center;
    padding: 15px;
    font-size: 1.1rem;
  }

  .nav-cta {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  /* Hero Section Optimizations (Global) */
  .page-hero {
    padding: 140px 0 40px;
  }

  /* Critical Fix: Hero Title Typography for All Pages */
  .hero-title,
  .page-hero h1 {
    font-size: 1.8rem !important;
    /* Smaller size to fit long words */
    line-height: 1.1;
    word-break: normal;
    /* Default break behavior */
    overflow-wrap: normal;
    /* Try not to break words */
    -webkit-hyphens: none;
    -ms-hyphens: none;
    hyphens: none !important;
    /* Strict no-hyphens rule */
    width: 100%;
    text-align: center !important;
    padding: 0 2px;
    /* Maximum horizontal space */
  }

  .hero-subtitle,
  .page-hero p {
    font-size: 1rem;
    max-width: 100%;
  }

  /* Hero Buttons - Full Width */
  .hero-content div[style*="flex"] {
    flex-direction: column;
    width: 100%;
    gap: 15px !important;
  }

  /* Force Centering of Hero Content Container */
  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
  }

  .hero-content .btn {
    width: 100%;
  }

  /* Stats Strip - 2x2 Grid */
  .stats-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    text-align: center;
    width: 100%;
  }

  .stat-block {
    flex: unset;
    min-width: 0;
  }

  .stat-block h4 {
    font-size: 2rem;
  }

  /* Force vertical stacking for Services/Training grids */
  .services-layout,
  .training-bento,
  .product-bento {
    display: flex !important;
    flex-direction: column !important;
    gap: 30px;
  }

  /* Or if grid used */
  [class*="bento"],
  [class*="layout"] {
    grid-template-columns: 1fr !important;
  }


  /* Or if grid used */
  [class*="grid"] {
    grid-template-columns: 1fr !important;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: left;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .contact-layout {
    grid-template-columns: 1fr;
  }

  /* About Page Mobile Fixes */
  .about-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }

  .about-card {
    padding: 30px !important;
    text-align: center !important;
    align-items: center;
  }

  .about-card h2 {
    font-size: 1.8rem !important;
    /* Resize to match hero confidence */
    hyphens: none !important;
    word-break: keep-all;
  }
}