/* ===================================
   MetalMasters Design System
   Precision Metal Fabrication
   =================================== */

/* Root Variables */
:root {
  /* Colors */
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-light: #3B82F6;
  --accent: #F59E0B;
  --accent-hover: #D97706;
  --charcoal: #1F2937;
  --charcoal-light: #374151;
  --gray: #6B7280;
  --gray-light: #9CA3AF;
  --gray-lighter: #D1D5DB;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --white: #FFFFFF;
  --success: #10B981;
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  
  /* Spacing */
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  
  /* Shadows */
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.1);
  
  /* Border Radius */
  --radius: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.625;
  color: var(--gray-800);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--charcoal);
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 800;
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.875rem);
  font-weight: 700;
}

p {
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--charcoal-light);
  margin-bottom: 1.5rem;
}

/* Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 4rem;
  }
}

/* Navigation */
.nav {
  background: var(--white);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.logo img {
  height: 40px;
  width: auto;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

@media (min-width: 1024px) {
  .logo img {
    height: 50px;
  }
}

.nav-menu {
  display: none;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .nav-menu {
    display: flex;
  }
}

.nav-link {
  font-weight: 500;
  color: var(--charcoal);
  transition: color 0.2s;
}

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

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

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--charcoal);
  transition: all 0.3s;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu */
@media (max-width: 767px) {
  .nav-menu.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 2rem;
    gap: 1rem;
  }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

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

.btn-accent:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

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

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

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
  padding: 0.75rem 1.625rem;
}

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

/* Hero Section */
.hero {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  color: var(--white);
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
  opacity: 1;
  filter: brightness(1.3) contrast(1.3) saturate(1.2);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(31, 41, 55, 0.45) 0%,
    rgba(37, 99, 235, 0.35) 100%
  );
  z-index: 2;
  backdrop-filter: blur(0px);
}

.hero-content {
  position: relative;
  z-index: 3;
  padding: 4rem 0;
  text-align: center;
}

.hero-logo-container {
  margin: 0 auto 2.5rem;
  max-width: 600px;
  padding: 0 1rem;
}

.hero-logo {
  width: 100%;
  height: auto;
  max-width: 500px;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

@media (max-width: 768px) {
  .hero-logo {
    max-width: 350px;
  }
}

@media (min-width: 768px) {
  .hero-content {
    padding: 6rem 0;
  }
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  margin-bottom: 1rem;
  color: var(--white);
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: rgba(255, 255, 255, 0.95);
}

.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.25rem);
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 3rem;
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.25rem;
}

.stat-number i {
  color: var(--accent);
  margin-right: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Section Styles */
.section {
  padding: 4rem 0;
}

@media (min-width: 768px) {
  .section {
    padding: 6rem 0;
  }
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.section-description {
  font-size: 1.125rem;
  color: var(--gray);
  max-width: 700px;
  margin: 0 auto;
}

.section-cta {
  text-align: center;
  margin-top: 3rem;
}

/* Services Section */
.section-services {
  background: var(--gray-50);
}

.services-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

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

.service-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
  color: var(--white);
}

.service-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.service-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--charcoal);
}

.service-description {
  color: var(--gray);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.service-features {
  list-style: none;
  margin-bottom: 1.5rem;
}

.service-features li {
  padding: 0.5rem 0;
  color: var(--charcoal-light);
}

.service-features i {
  color: var(--success);
  margin-right: 0.5rem;
}

/* Portfolio Section */
.portfolio-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.portfolio-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.portfolio-item:hover {
  box-shadow: var(--shadow-xl);
  transform: scale(1.02);
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.portfolio-item:hover img {
  transform: scale(1.1);
}

.portfolio-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    to top,
    rgba(31, 41, 55, 0.95) 0%,
    rgba(31, 41, 55, 0.7) 50%,
    transparent 100%
  );
  padding: 2rem 1.5rem 1.5rem;
  color: var(--white);
  transform: translateY(0);
  transition: transform 0.3s ease;
}

.portfolio-overlay h4 {
  font-size: 1.125rem;
  color: var(--white);
  margin-bottom: 0.25rem;
}

.portfolio-overlay p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

/* About Section */
.section-about {
  background: var(--white);
}

.about-content {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .about-content {
    grid-template-columns: 1fr 1fr;
  }
}

.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-values {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .about-values {
    grid-template-columns: repeat(2, 1fr);
  }
}

.value {
  text-align: center;
  padding: 1.5rem;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
}

.value:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.value i {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 1rem;
  transition: color 0.3s;
}

.value:hover i {
  color: var(--white);
}

.value h4 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.value:hover h4 {
  color: var(--white);
}

.value p {
  font-size: 0.875rem;
  color: var(--gray);
  margin: 0;
}

.value:hover p {
  color: rgba(255, 255, 255, 0.9);
}

/* Industries Section */
.section-industries {
  background: var(--gray-50);
}

.industries-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .industries-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .industries-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.industry-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

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

.industry-card i {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.industry-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.industry-card p {
  font-size: 0.9375rem;
  color: var(--gray);
  margin: 0;
}

/* CTA Section */
.section-cta {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: var(--white);
}

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

.cta-content h2 {
  color: var(--white);
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.cta-content p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Footer */
.footer {
  background: var(--charcoal);
  color: rgba(255, 255, 255, 0.8);
  padding: 3rem 0 1rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
  }
}

.footer-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-description {
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
}

.footer-social a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: all 0.3s ease;
}

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

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

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.2s;
}

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

.footer-contact {
  list-style: none;
}

.footer-contact li {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  align-items: flex-start;
}

.footer-contact i {
  color: var(--primary);
  margin-top: 0.25rem;
}

.footer-contact a {
  color: rgba(255, 255, 255, 0.8);
}

.footer-contact a:hover {
  color: var(--white);
}

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

.footer-legal {
  display: flex;
  gap: 1.5rem;
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
}

.footer-legal a:hover {
  color: var(--white);
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }

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

*:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

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