/* ========================================
   Ensemble Legacy — Styles
   Color palette inspired by Ensemble Designs:
   Professional blues, deep navys, clean whites
   Modernized with contemporary typography
   ======================================== */

:root {
  /* Core palette */
  --navy:       #0a1628;
  --navy-light: #121e33;
  --blue:       #2563eb;
  --blue-light: #3b82f6;
  --teal:       #0ea5e9;
  --cyan:       #06b6d4;

  /* Neutrals */
  --white:      #ffffff;
  --gray-50:    #f8fafc;
  --gray-100:   #f1f5f9;
  --gray-200:   #e2e8f0;
  --gray-300:   #cbd5e1;
  --gray-400:   #94a3b8;
  --gray-500:   #64748b;
  --gray-600:   #475569;
  --gray-700:   #334155;
  --gray-800:   #1e293b;
  --gray-900:   #0f172a;

  /* Functional */
  --text:       #1e293b;
  --text-light: #64748b;
  --text-inv:   #e2e8f0;
  --text-inv-light: #94a3b8;
  --accent:     var(--blue);
  --accent-glow: rgba(37, 99, 235, 0.15);

  /* Layout */
  --container:  1200px;
  --nav-h:      72px;
  --radius:     12px;
  --radius-sm:  8px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button, input, select, textarea { font: inherit; }

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

/* ---- Navigation ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(10, 22, 40, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  border-radius: var(--radius-sm);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 16px; color: var(--white);
}
.logo-text {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600; font-size: 18px; color: var(--white);
}
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--text-inv-light);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }
.btn-nav {
  padding: 8px 20px !important;
  background: var(--blue) !important;
  color: var(--white) !important;
  border-radius: var(--radius-sm) !important;
}
.btn-nav:hover { background: var(--blue-light) !important; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span {
  display: block; width: 24px; height: 2px; background: var(--white);
  margin: 5px 0; transition: 0.3s;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 32px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 15px;
  transition: all 0.25s; cursor: pointer; border: none;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-light); transform: translateY(-1px); box-shadow: 0 8px 24px var(--accent-glow); }
.btn-outline { border: 2px solid rgba(255,255,255,0.3); color: var(--white); background: transparent; }
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.05); }
.btn-full { width: 100%; }

/* ---- Hero ---- */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  background: var(--navy);
  overflow: hidden;
  padding-top: var(--nav-h);
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(37,99,235,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(6,182,212,0.08) 0%, transparent 60%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-light) 100%);
}
.hero-content { position: relative; max-width: 780px; padding: 80px 0; }
.hero-tag {
  font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 2px;
  color: var(--teal); margin-bottom: 24px;
}
.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 700; line-height: 1.1;
  color: var(--white); margin-bottom: 24px;
}
.text-accent {
  background: linear-gradient(90deg, var(--blue-light), var(--cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 18px; line-height: 1.7; color: var(--text-inv-light);
  max-width: 600px; margin-bottom: 40px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---- Sections ---- */
.section { padding: 120px 0; }
.section-dark { background: var(--navy); color: var(--text-inv); }
.section-header { text-align: center; max-width: 700px; margin: 0 auto 64px; }
.section-tag {
  font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 2px;
  color: var(--blue); margin-bottom: 16px;
}
.section-dark .section-tag { color: var(--teal); }
.section-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700; line-height: 1.2;
  margin-bottom: 16px;
}
.section-sub { font-size: 16px; color: var(--text-light); line-height: 1.7; }
.section-dark .section-sub { color: var(--text-inv-light); }

/* ---- About ---- */
.about-text { max-width: 800px; margin: 0 auto; }
.about-text p { font-size: 17px; line-height: 1.8; color: var(--gray-600); margin-bottom: 20px; }
.about-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
  margin-top: 48px; padding-top: 48px;
  border-top: 1px solid var(--gray-200);
}
.stat-num {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 32px; font-weight: 700; color: var(--blue);
  margin-bottom: 8px;
}
.stat-label { font-size: 14px; color: var(--text-light); }

/* ---- Services Cards ---- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.card {
  background: var(--navy-light);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 40px 32px;
  transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.card-icon {
  width: 56px; height: 56px; margin-bottom: 24px;
  color: var(--teal);
}
.card-icon svg { width: 100%; height: 100%; }
.card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px; font-weight: 600; margin-bottom: 16px;
}
.card p { font-size: 15px; line-height: 1.7; color: var(--text-inv-light); margin-bottom: 20px; }
.card-list { padding-left: 0; }
.card-list li {
  position: relative; padding-left: 20px;
  font-size: 14px; color: var(--text-inv-light);
  margin-bottom: 8px;
}
.card-list li::before {
  content: ''; position: absolute; left: 0; top: 8px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal);
}

/* ---- Portfolio ---- */
.portfolio-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.portfolio-item {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}
.portfolio-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.08);
}
.portfolio-img {
  display: flex; align-items: center; justify-content: center;
  height: 200px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: var(--accent, var(--blue));
  opacity: 0.85;
}
.portfolio-img svg { width: 120px; height: 80px; }
.portfolio-item h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px; font-weight: 600;
  padding: 24px 24px 8px;
}
.portfolio-item p {
  font-size: 14px; color: var(--text-light); line-height: 1.6;
  padding: 0 24px 24px;
}

/* ---- Manufacturing ---- */
.mfg-text { max-width: 900px; margin: 0 auto; }
.mfg-text > p { font-size: 17px; line-height: 1.8; color: var(--text-inv-light); margin-bottom: 48px; text-align: center; }
.mfg-features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.mfg-feature {
  padding: 32px;
  background: var(--navy-light);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
}
.mfg-feature h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px; font-weight: 600; color: var(--white);
  margin-bottom: 12px;
}
.mfg-feature p { font-size: 14px; line-height: 1.7; color: var(--text-inv-light); }

/* ---- Contact ---- */
.contact-grid { display: grid; grid-template-columns: 1fr 380px; gap: 64px; align-items: start; }
.contact-form {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 40px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-size: 14px; font-weight: 500;
  color: var(--text); margin-bottom: 8px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 15px; color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group textarea { resize: vertical; }
.form-note {
  margin-top: 16px; font-size: 14px; text-align: center;
  min-height: 20px;
}
.form-note.success { color: #16a34a; }
.form-note.error { color: #dc2626; }

.contact-info { padding-top: 16px; }
.contact-block { margin-bottom: 40px; }
.contact-block h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px; font-weight: 600; margin-bottom: 8px;
}
.contact-block p { font-size: 14px; color: var(--text-light); line-height: 1.6; }
.contact-email {
  display: inline-block; font-size: 18px; font-weight: 600;
  color: var(--blue); margin-top: 4px;
  transition: color 0.2s;
}
.contact-email:hover { color: var(--blue-light); }

/* ---- Footer ---- */
.footer {
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 48px 0;
}
.footer-inner { text-align: center; }
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 8px; }
.footer-brand .logo-mark { width: 32px; height: 32px; font-size: 13px; }
.footer-brand .logo-text { font-size: 16px; }
.footer-tagline { font-size: 13px; color: var(--text-inv-light); margin-bottom: 24px; }
.footer-links { display: flex; justify-content: center; gap: 32px; margin-bottom: 32px; }
.footer-links a { font-size: 14px; color: var(--text-inv-light); transition: color 0.2s; }
.footer-links a:hover { color: var(--white); }
.footer-copy { font-size: 13px; color: var(--gray-600); }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: 1fr; max-width: 600px; margin: 0 auto; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-info { order: -1; }
}
@media (max-width: 768px) {
  .section { padding: 80px 0; }
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: var(--navy);
    flex-direction: column; padding: 24px;
    gap: 16px; border-bottom: 1px solid rgba(255,255,255,0.06);
    transform: translateY(-100%); opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    pointer-events: none;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: all; }
  .about-stats { grid-template-columns: 1fr; gap: 24px; text-align: center; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .mfg-features { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero-content { padding: 40px 0; }
  .footer-links { flex-wrap: wrap; gap: 16px; }
}
