/* =========================
   Precise Machine & Tool Co.
   Static stylesheet
   ========================= */

:root {
  --background: hsl(220 30% 8%);
  --foreground: hsl(210 20% 90%);
  --border: hsl(220 20% 18%);
  --card: hsl(220 25% 12%);
  --card-border: hsl(220 20% 18%);
  --primary: hsl(32 95% 55%);
  --primary-foreground: hsl(220 30% 10%);
  --secondary: hsl(215 20% 18%);
  --muted-foreground: hsl(215 15% 65%);
  --white: #ffffff;

  --font-sans: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-display: 'Syncopate', 'Inter', sans-serif;

  --container: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.5;
}

::selection { background: var(--primary); color: var(--primary-foreground); }

a { color: inherit; text-decoration: none; }

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (min-width: 768px) { .container { padding: 0 3rem; } }

.accent { color: var(--primary); }

.icon { width: 1.25rem; height: 1.25rem; margin-left: 0.5rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 0;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color .2s, color .2s, border-color .2s;
  font-size: 0.875rem;
  line-height: 1;
}
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { background: hsl(32 95% 50%); }
.btn-outline { background: transparent; color: var(--white); border-color: var(--border); }
.btn-outline:hover { background: var(--secondary); }
.btn-sm { padding: 0.625rem 1.5rem; }
.btn-lg { padding: 0 2rem; height: 3.5rem; font-size: 1rem; }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 50;
  padding: 1.5rem 0;
  border-bottom: 1px solid transparent;
  transition: padding .3s, background-color .3s, border-color .3s, box-shadow .3s, backdrop-filter .3s;
  background: transparent;
}
.navbar.scrolled {
  padding: 1rem 0;
  background: rgba(15, 21, 32, 0.95);
  backdrop-filter: blur(8px);
  border-bottom-color: var(--border);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.5);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.brand-mark {
  width: 2.5rem; height: 2.5rem;
  background: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.brand-mark svg { width: 1.5rem; height: 1.5rem; color: var(--primary-foreground); }
.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  color: var(--white);
}
.nav-links { display: none; align-items: center; gap: 2rem; font-size: 0.875rem; font-weight: 500; letter-spacing: 0.05em; }
@media (min-width: 768px) { .nav-links { display: flex; } }
.nav-links a { color: var(--muted-foreground); transition: color .2s; }
.nav-links a:hover { color: var(--white); }
.nav-links a.btn-primary { color: var(--primary-foreground); }
.nav-links a.btn-primary:hover { color: var(--primary-foreground); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-top: 5rem;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: 0.4; }
.hero-overlay-x {
  position: absolute; inset: 0;
  background: linear-gradient(to right, var(--background), rgba(15,21,32,0.9), rgba(15,21,32,0.2));
}
.hero-overlay-y {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent, transparent, var(--background));
}
.hero-inner { position: relative; z-index: 1; max-width: 56rem; }
.hero-eyebrow { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.hero-eyebrow .bar { display: block; width: 3rem; height: 2px; background: var(--primary); }
.eyebrow {
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.15em;
  font-size: 0.875rem;
  text-transform: uppercase;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  margin: 0 0 1.5rem 0;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
}
.gradient-text {
  background: linear-gradient(to right, var(--primary), #fcd34d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: var(--muted-foreground);
  margin: 0 0 2.5rem 0;
  max-width: 42rem;
  line-height: 1.7;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ---------- Stats ---------- */
.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(33, 41, 56, 0.5);
  position: relative;
  z-index: 2;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  padding: 2rem 1.5rem;
}
@media (min-width: 768px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 2rem 3rem; }
  .stats-grid .stat + .stat { border-left: 1px solid var(--border); padding-left: 1rem; }
}
.stat { text-align: center; }
.stat-value {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--white);
  font-size: 1.875rem;
  margin-bottom: 0.25rem;
}
.stat-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ---------- Sections ---------- */
.section { padding: 6rem 0; position: relative; }
@media (min-width: 768px) { .section { padding: 8rem 0; } }
.section-alt {
  background: rgba(33, 41, 56, 0.3);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--white);
  margin: 0 0 1.5rem 0;
  font-size: clamp(1.875rem, 4vw, 3rem);
  line-height: 1.15;
}
.section-head { text-align: center; max-width: 48rem; margin: 0 auto 5rem; }
.section-sub { color: var(--muted-foreground); font-size: 1.125rem; margin: 0; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  align-items: center;
}
@media (min-width: 768px) { .about-grid { grid-template-columns: 1fr 1fr; } }
.prose { color: var(--muted-foreground); font-size: 1.125rem; line-height: 1.7; }
.prose p { margin: 0 0 1.5rem 0; }
.prose blockquote {
  margin: 2rem 0 0 0;
  padding: 0.5rem 0 0.5rem 1.5rem;
  border-left: 2px solid var(--primary);
  font-style: italic;
  color: var(--white);
  font-weight: 500;
}
.about-image-wrap { position: relative; }
.about-image { aspect-ratio: 4/3; position: relative; z-index: 1; }
.about-image img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.2) contrast(1.25); }
.about-image-frame {
  position: absolute; inset: 1rem;
  border: 2px solid hsla(32, 95%, 55%, 0.5);
  pointer-events: none;
}
.about-image-shadow {
  position: absolute;
  inset: -1rem;
  background: rgba(33, 41, 56, 0.8);
  transform: translate(2rem, 2rem);
  z-index: 0;
}

/* ---------- Services ---------- */
.services-glow {
  position: absolute; top: 0; right: 0;
  width: 800px; height: 800px;
  background: hsla(32, 95%, 55%, 0.05);
  border-radius: 9999px;
  filter: blur(120px);
  pointer-events: none;
}
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  position: relative;
  z-index: 1;
}
@media (min-width: 640px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .services-grid { grid-template-columns: repeat(4, 1fr); } }
.service-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: border-color .2s;
}
.service-card:hover { border-color: hsla(32, 95%, 55%, 0.5); }
.card-glow {
  position: absolute; top: 0; right: 0;
  width: 8rem; height: 8rem;
  background: hsla(32, 95%, 55%, 0.05);
  border-radius: 9999px;
  filter: blur(40px);
  transition: background-color .2s;
}
.service-card:hover .card-glow { background: hsla(32, 95%, 55%, 0.2); }
.service-icon { color: var(--primary); margin-bottom: 1.5rem; }
.service-icon svg { width: 2rem; height: 2rem; }
.service-card h3 { color: var(--white); font-size: 1.25rem; font-weight: 700; margin: 0 0 1.5rem 0; }
.service-card ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.service-card li { display: flex; align-items: flex-start; gap: 0.75rem; color: var(--muted-foreground); font-size: 0.875rem; }
.service-card .dot {
  margin-top: 0.4rem;
  width: 0.375rem; height: 0.375rem;
  background: hsla(32, 95%, 55%, 0.8);
  border-radius: 9999px;
  flex-shrink: 0;
}

/* ---------- Capabilities ---------- */
.capabilities-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: 2.5rem;
}
@media (min-width: 640px) { .capabilities-grid { grid-template-columns: 1fr 1fr; } }
.cap-head {
  color: var(--white);
  font-weight: 700;
  font-size: 1.125rem;
  margin: 0 0 1.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}
.cap-head .square { width: 0.5rem; height: 0.5rem; background: var(--primary); display: inline-block; }
.cap-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1rem; }
.cap-list li { color: var(--muted-foreground); display: flex; align-items: center; gap: 0.75rem; }
.cap-list .chev { width: 1rem; height: 1rem; color: hsla(32, 95%, 55%, 0.5); flex-shrink: 0; }

/* ---------- Contact ---------- */
.section-contact {
  background: var(--card);
  border-top: 1px solid var(--border);
}
.contact-card {
  max-width: 64rem;
  margin: 0 auto;
  background: var(--secondary);
  border: 1px solid var(--border);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}
@media (min-width: 768px) { .contact-card { padding: 4rem; } }
.contact-accent-bar {
  position: absolute; top: 0; left: 0;
  width: 0.5rem; height: 100%;
  background: var(--primary);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  position: relative;
  z-index: 1;
}
@media (min-width: 768px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--white);
  margin: 0 0 1.5rem 0;
  font-size: clamp(1.875rem, 3vw, 2.25rem);
  line-height: 1.2;
}
.contact-sub { color: var(--muted-foreground); margin: 0 0 2rem 0; font-size: 1.125rem; }
.contact-info { display: flex; flex-direction: column; gap: 1.5rem; }
.info-row { display: flex; align-items: flex-start; gap: 1rem; }
.info-icon { width: 1.5rem; height: 1.5rem; color: var(--primary); flex-shrink: 0; margin-top: 0.25rem; }
.info-row > div + * { margin-top: 0; }
.info-label { color: var(--white); font-weight: 700; margin-bottom: 0.25rem; }
.info-text { color: var(--muted-foreground); }
.info-eyebrow { color: var(--muted-foreground); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.25rem; }
.info-link { color: var(--white); font-weight: 700; transition: color .2s; }
.info-link:hover { color: var(--primary); }

.key-contacts {
  background: var(--background);
  padding: 2rem;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.key-contacts h3 {
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 2rem 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}
.contact-people { display: flex; flex-direction: column; gap: 2rem; }
.person-name { color: var(--white); font-weight: 700; font-size: 1.125rem; }
.person-role { color: var(--primary); font-size: 0.875rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.5rem; }
.person-email {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--muted-foreground);
  transition: color .2s;
}
.person-email:hover { color: var(--white); }
.person-email svg { width: 1rem; height: 1rem; }

/* ---------- Footer ---------- */
.footer {
  background: var(--background);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}
.footer p { margin: 0; }
.footer-fine { margin-top: 0.5rem !important; font-size: 0.75rem; }

/* Initial reveal effect (lightweight, no JS) */
@media (prefers-reduced-motion: no-preference) {
  .hero-inner > *, .section-title, .section-head, .service-card, .about-image-wrap, .prose, .cap-head, .cap-list, .contact-grid {
    animation: rise .8s ease-out both;
  }
  @keyframes rise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
  }
}
