/* ============================================
   EXACT ASSEMBLY - Main Stylesheet
   A professional, technical aesthetic with warmth
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  /* Primary palette - deep tech blue with warm accents */
  --color-primary: #1a365d;
  --color-primary-light: #2c5282;
  --color-primary-dark: #0f2744;
  
  /* Accent - electric copper/orange for CTAs and highlights */
  --color-accent: #dd6b20;
  --color-accent-light: #ed8936;
  --color-accent-dark: #c05621;
  
  /* Neutrals */
  --color-bg: #fafafa;
  --color-bg-alt: #f0f4f8;
  --color-surface: #ffffff;
  --color-text: #1a202c;
  --color-text-muted: #4a5568;
  --color-text-light: #718096;
  --color-border: #e2e8f0;
  
  /* Technical green for success states */
  --color-success: #38a169;
  
  /* Typography */
  --font-display: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  /* 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;
  --space-4xl: 6rem;
  
  /* Sizing */
  --max-width: 1200px;
  --max-width-narrow: 800px;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 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);
  
  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p {
  margin: 0 0 var(--space-md);
}

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

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

code, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

code {
  background: var(--color-bg-alt);
  padding: 0.125em 0.375em;
  border-radius: var(--radius-sm);
}

pre {
  background: var(--color-primary-dark);
  color: #e2e8f0;
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: var(--space-xl) 0;
}

pre code {
  background: none;
  padding: 0;
}

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

.container--narrow {
  max-width: var(--max-width-narrow);
}

.section {
  padding: var(--space-4xl) 0;
}

.section--alt {
  background: var(--color-bg-alt);
}

.section--dark {
  background: var(--color-primary-dark);
  color: #fff;
}

.section--dark h2,
.section--dark h3 {
  color: #fff;
}

/* ---------- Header & Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.95);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  max-width: var(--max-width);
  margin: 0 auto;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-primary-dark);
  text-decoration: none;
}

.site-logo img {
  height: 40px;
  width: auto;
}

.site-logo:hover {
  color: var(--color-primary);
}

/* Main Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: var(--space-lg);
}

.nav-links a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-text);
  padding: var(--space-sm) 0;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition-base);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

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

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  margin: 6px 0;
  transition: var(--transition-base);
}

/* CTA Button in nav */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--color-accent);
  color: #fff !important;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.nav-cta:hover {
  background: var(--color-accent-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Mobile Navigation */
@media (max-width: 900px) {
  .nav-toggle {
    display: block;
    z-index: 1001;
  }
  
  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background: var(--color-surface);
    flex-direction: column;
    justify-content: flex-start;
    padding: var(--space-4xl) var(--space-xl);
    box-shadow: var(--shadow-xl);
    transition: right var(--transition-slow);
  }
  
  .main-nav.is-open {
    right: 0;
  }
  
  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: var(--space-md);
  }
  
  .nav-links a {
    font-size: 1.125rem;
    padding: var(--space-sm) 0;
  }
  
  .nav-cta {
    width: 100%;
    justify-content: center;
    margin-top: var(--space-lg);
  }
}

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 1;
  color: #fff;
  max-width: 700px;
}

.hero h1 {
  color: #fff;
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: var(--space-lg);
  line-height: 1.1;
}

.hero-tagline {
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-xl);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* Animated circuit lines decoration */
.hero-decoration {
  position: absolute;
  right: -5%;
  top: 50%;
  transform: translateY(-50%);
  width: 50%;
  height: 80%;
  opacity: 0.15;
  pointer-events: none;
}

.circuit-svg {
  width: 100%;
  height: 100%;
}

.circuit-path {
  stroke: #fff;
  stroke-width: 1;
  fill: none;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawCircuit 3s ease forwards;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn--primary {
  background: var(--color-accent);
  color: #fff;
}

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

.btn--secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn--secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

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

.btn--outline:hover {
  background: var(--color-primary);
  color: #fff;
}

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

.service-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: all var(--transition-base);
  text-decoration: none;
  color: inherit;
  display: block;
}

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

.service-card__icon {
  width: 56px;
  height: 56px;
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
  color: var(--color-accent);
}

.service-card__icon svg {
  width: 28px;
  height: 28px;
}

.service-card h3 {
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

.service-card p {
  color: var(--color-text-muted);
  margin: 0;
}

.service-card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-md);
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.9rem;
}

.service-card__link svg {
  transition: transform var(--transition-fast);
}

.service-card:hover .service-card__link svg {
  transform: translateX(4px);
}

/* ---------- Industries Section ---------- */
.industries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-lg);
}

.industry-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  transition: all var(--transition-fast);
}

.industry-item:hover {
  border-color: var(--color-accent);
  background: var(--color-bg-alt);
}

.industry-item__icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.industry-item h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

/* ---------- About/Value Prop Section ---------- */
.value-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

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

.value-content h2 {
  margin-bottom: var(--space-lg);
}

.value-content p {
  color: var(--color-text-muted);
  font-size: 1.1rem;
}

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

.stat-item {
  text-align: center;
  padding: var(--space-lg);
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
}

.stat-item__number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
}

.stat-item__label {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: var(--space-xs);
}

/* ---------- Technology Pills ---------- */
.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  list-style: none;
  padding: 0;
  margin: var(--space-lg) 0 0;
}

.tech-list li {
  background: var(--color-primary-dark);
  color: #fff;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
}

/* ---------- Blog/Posts ---------- */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-xl);
}

.post-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: all var(--transition-base);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  color: inherit;
}

.post-card__image {
  aspect-ratio: 16/9;
  background: var(--color-bg-alt);
  overflow: hidden;
}

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

.post-card:hover .post-card__image img {
  transform: scale(1.05);
}

.post-card__content {
  padding: var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card__meta {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-sm);
}

.post-card h3 {
  font-size: 1.125rem;
  margin-bottom: var(--space-sm);
  line-height: 1.4;
}

.post-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin: 0;
  flex: 1;
}

/* ---------- Contact Section ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
}

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

.contact-info h3 {
  margin-bottom: var(--space-lg);
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.contact-item__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
}

.contact-item__content h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 var(--space-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.contact-item__content p,
.contact-item__content a {
  margin: 0;
  font-size: 1.1rem;
}

/* Simple contact form styling */
.contact-form {
  background: var(--color-surface);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

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

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: var(--space-3xl) 0 var(--space-xl);
}

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

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

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

.footer-brand p {
  margin-top: var(--space-md);
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-lg);
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: var(--space-sm);
}

.footer-col a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--color-accent-light);
}

.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);
  font-size: 0.875rem;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a:hover {
  color: #fff;
}

/* ---------- Page Headers ---------- */
.page-header {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  color: #fff;
  padding: var(--space-4xl) 0 var(--space-3xl);
  text-align: center;
}

.page-header h1 {
  color: #fff;
  margin-bottom: var(--space-md);
}

.page-header p {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* ---------- Content Pages ---------- */
.content-page {
  padding: var(--space-3xl) 0;
}

.content-page h2 {
  margin-top: var(--space-2xl);
}

.content-page h2:first-child {
  margin-top: 0;
}

.content-page ul,
.content-page ol {
  margin-bottom: var(--space-lg);
  padding-left: var(--space-xl);
}

.content-page li {
  margin-bottom: var(--space-sm);
}

.content-page img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: var(--space-xl) 0;
}

.content-page figure {
  margin: var(--space-xl) 0;
}

.content-page figcaption {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-top: var(--space-sm);
}

/* ---------- Blog Post Styles ---------- */
.post-header {
  margin-bottom: var(--space-2xl);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: var(--space-lg);
}

.post-author {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.post-author img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.post-content {
  font-size: 1.1rem;
  line-height: 1.8;
}

.post-content blockquote {
  border-left: 4px solid var(--color-accent);
  margin: var(--space-xl) 0;
  padding: var(--space-md) var(--space-xl);
  background: var(--color-bg-alt);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
}

.post-content blockquote p:last-child {
  margin-bottom: 0;
}

.post-content blockquote cite {
  display: block;
  margin-top: var(--space-md);
  font-style: normal;
  font-weight: 600;
  color: var(--color-text-muted);
}

/* ---------- Utility Classes ---------- */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.text-accent { color: var(--color-accent); }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-lg { margin-top: var(--space-lg); }
.mb-lg { margin-bottom: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-xl { margin-bottom: var(--space-xl); }

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

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

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ---------- Print Styles ---------- */
@media print {
  .site-header,
  .site-footer,
  .nav-toggle {
    display: none;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }
  
  a {
    color: #000;
    text-decoration: underline;
  }
}
