/* ============================================
   LEEDOM PRECISION — Design System
   Palette: shop-floor graphite + blueprint accent
   Type: Archivo (display) / Inter (body) / IBM Plex Mono (spec callouts)
   Signature motif: GD&T-style dimension lines & tolerance callouts
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@600;700;800;900&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* Core palette */
  --ink: #191b1f;
  --ink-2: #22252b;
  --ink-3: #2c2f36;
  --steel: #565b64;
  --steel-light: #8a8f98;
  --aluminum: #cbd0d6;
  --paper: #f5f4f0;
  --paper-2: #eae8e2;
  --white: #ffffff;
  --blueprint: #1c5a8a;
  --blueprint-light: #4f8fc0;
  --blueprint-dim: #143f61;

  /* Type */
  --font-display: 'Archivo', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* Layout */
  --max-width: 1200px;
  --edge: clamp(1.25rem, 4vw, 3rem);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--edge);
  padding-right: var(--edge);
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ============ Dimension-line signature motif ============
   Thin rule with arrow ticks + mono tolerance-style label,
   echoing GD&T callouts on a machine drawing. Used as section
   dividers throughout — real vocabulary of the shop's own world. */

.dim-line {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.75rem;
  color: var(--blueprint);
}
.dim-line::before,
.dim-line::after {
  content: "";
  flex: 1;
  height: 1px;
  background: currentColor;
  position: relative;
}
.dim-line::before { background-image: linear-gradient(90deg, currentColor, currentColor); }
.dim-line-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
  text-transform: uppercase;
}
.dim-line.on-dark { color: var(--blueprint-light); }

/* arrow ticks via clip-path pseudo elements on a wrapper */
.dim-tick {
  width: 0;
  height: 0;
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
  border-left: 5px solid var(--blueprint);
  flex: 0 0 auto;
}
.dim-line.on-dark .dim-tick { border-left-color: var(--blueprint-light); }

/* ============ Nav ============ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(25, 27, 31, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--ink-3);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--white);
}
/* Logo slot — a light plate behind the mark so it reads cleanly on the
   dark nav whether the dropped-in file is a transparent PNG or a JPG
   with a plain white background. Just replace assets/logo.png (or
   assets/logo.jpg) and it flows through automatically. */
.brand-logo-plate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border-radius: 6px;
  padding: 6px 12px;
  line-height: 0;
}
.brand-logo {
  height: 46px;
  width: auto;
  display: block;
}
@media (max-width: 860px) {
  .brand-logo { height: 38px; }
}
.brand-word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--white);
}
.brand-word span { color: var(--blueprint-light); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--aluminum);
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--white);
  border-color: var(--blueprint-light);
}

.nav-cta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--blueprint);
  color: var(--white) !important;
  padding: 0.6rem 1.1rem;
  border-radius: 2px;
  border: 1px solid var(--blueprint-light);
  transition: background 0.15s ease;
}
.nav-cta:hover { background: var(--blueprint-light); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--aluminum);
  color: var(--white);
  padding: 0.4rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  border-radius: 2px;
}

@media (max-width: 860px) {
  .nav-links { display: none; gap: 1.25rem; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--ink); padding: 1.25rem var(--edge); border-bottom: 1px solid var(--ink-3); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: inline-block; }
  .nav-cta { display: none; }
}

/* ============ Buttons ============ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.85rem 1.5rem;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--blueprint); color: var(--white); border-color: var(--blueprint-light); }
.btn-primary:hover { background: var(--blueprint-light); }
.btn-outline-dark { background: transparent; color: var(--white); border-color: var(--aluminum); }
.btn-outline-dark:hover { border-color: var(--blueprint-light); color: var(--blueprint-light); }
.btn-outline-light { background: transparent; color: var(--ink); border-color: var(--steel); }
.btn-outline-light:hover { border-color: var(--blueprint); color: var(--blueprint); }

/* ============ Hero ============ */

.hero {
  background: var(--ink);
  color: var(--white);
  padding: 5.5rem 0 4.5rem;
  position: relative;
  overflow: hidden;
}
/* ============ Machine section: photo (1/3) + content (2/3) ============ */

.machine-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2.5rem;
  align-items: stretch;
}
@media (max-width: 1080px) {
  .machine-grid { grid-template-columns: 1fr; }
}

.machine-photo {
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--aluminum);
}
.machine-photo-media {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  display: block;
}
.machine-photo-placeholder {
  background: linear-gradient(135deg, var(--ink-3), var(--ink));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--steel-light);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-align: center;
  padding: 1.5rem;
}
@media (max-width: 860px) {
  .machine-photo-media { aspect-ratio: 4 / 3; height: auto; min-height: 0; }
}

.machine-content .section-head { margin-bottom: 2rem; }

/* ============ Photo banner (full-width, used mid-section) ============ */

.photo-banner {
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--aluminum);
  margin-bottom: 2.5rem;
}
.photo-banner-media {
  width: 100%;
  aspect-ratio: 21 / 8;
  object-fit: cover;
  display: block;
}
@media (max-width: 700px) { .photo-banner-media { aspect-ratio: 4 / 3; } }
.photo-banner-placeholder {
  background: linear-gradient(135deg, var(--ink-3), var(--ink));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--steel-light);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-align: center;
  padding: 1.5rem;
}

/* ============ Photo feature (centered, contained width) ============ */

.photo-feature {
  max-width: 640px;
  margin: 2.5rem auto 0;
  text-align: center;
}
.photo-feature-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: 4px;
  border: 1px solid var(--ink-3);
}
.photo-feature-placeholder {
  background: linear-gradient(135deg, var(--ink-3), var(--ink));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--steel-light);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-align: center;
  padding: 1.5rem;
}
.photo-feature-caption {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--steel);
  margin: 0.9rem 0 0;
}
   The background image (or its placeholder) fills the section behind
   the text. .hero-overlay sits on top of it as a dark gradient so the
   headline stays readable — that's the "translucent" look. Everything
   in .hero-content sits above both, via z-index. */

.hero.hero-image {
  position: relative;
  overflow: hidden;
  padding: 6.5rem 0 5.5rem;
  min-height: 520px;
  display: flex;
  align-items: center;
  color: var(--white);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-bg-placeholder {
  width: 100%;
  height: 100%;
  min-height: 520px;
  background: linear-gradient(135deg, var(--ink-3), var(--ink));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--steel-light);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-align: center;
  padding: 2rem;
}

/* Dark gradient over the image — darkest behind the text on the left,
   lighter toward the right so the photo still reads as a photo.
   Turn the opacity numbers up if your photo makes the text hard to read. */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(25, 27, 31, 0.92) 0%,
    rgba(25, 27, 31, 0.7) 50%,
    rgba(25, 27, 31, 0.4) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
}

/* ============ Capability strip (below hero, not overlapping the photo) ============ */

.capability-strip {
  background: var(--ink-2);
  border-bottom: 1px solid var(--ink-3);
  padding: 0;
}
.spec-plate-rows-strip {
  grid-template-columns: repeat(6, 1fr);
}
.spec-plate-rows-strip .spec-plate-row:nth-child(3n) { border-right: 1px solid var(--ink-3); }
.spec-plate-rows-strip .spec-plate-row:nth-child(6n) { border-right: none; }
.spec-plate-rows-strip .spec-plate-row:first-child { border-left: none; }
@media (max-width: 900px) {
  .spec-plate-rows-strip { grid-template-columns: repeat(3, 1fr); }
  .spec-plate-rows-strip .spec-plate-row:nth-child(3n) { border-right: none; }
}
@media (max-width: 560px) {
  .spec-plate-rows-strip { grid-template-columns: repeat(2, 1fr); }
  .spec-plate-rows-strip .spec-plate-row:nth-child(2n) { border-right: none; }
  .spec-plate-rows-strip .spec-plate-row:nth-child(3n) { border-right: 1px solid var(--ink-3); }
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blueprint-light);
  margin-bottom: 1rem;
  display: block;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 900;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1.25rem;
}
.hero h1 em {
  font-style: normal;
  color: var(--blueprint-light);
}

.hero p.lead {
  font-size: 1.1rem;
  color: var(--aluminum);
  max-width: 46ch;
  margin-bottom: 2rem;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.spec-plate {
  border: 1px solid var(--ink-3);
  background: var(--ink-2);
  border-radius: 4px;
  overflow: hidden;
}
.spec-plate-media {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--ink-3), var(--ink));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--steel-light);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-align: center;
  padding: 1rem;
}
.spec-plate-rows { display: grid; grid-template-columns: 1fr 1fr 1fr; }
.spec-plate-row {
  padding: 0.9rem 1rem;
  border-top: 1px solid var(--ink-3);
  border-right: 1px solid var(--ink-3);
}
.spec-plate-row:nth-child(3n) { border-right: none; }
.spec-plate-row .k {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--steel-light);
  display: block;
  margin-bottom: 0.25rem;
}
.spec-plate-row .v { font-weight: 600; font-size: 0.9rem; color: var(--white); }

/* ============ Sections ============ */

section { padding: 4.5rem 0; }
.section-alt { background: var(--paper-2); }
.section-dark { background: var(--ink); color: var(--white); }

.section-head { max-width: 62ch; margin-bottom: 2.5rem; }
.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.section-head p { color: var(--steel); font-size: 1.05rem; }
.section-dark .section-head p { color: var(--aluminum); }

/* ============ Cards / grids ============ */

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
@media (max-width: 860px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border: 1px solid var(--paper-2);
  border-radius: 4px;
  padding: 1.75rem;
  position: relative;
}
.card-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blueprint);
  display: block;
  margin-bottom: 0.6rem;
}
.card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.card p { color: var(--steel); font-size: 0.95rem; margin-bottom: 0; }

.card-dark {
  background: var(--ink-2);
  border: 1px solid var(--ink-3);
  color: var(--white);
}
.card-dark p { color: var(--aluminum); }

/* ============ Tolerance callout chips ============ */

.chip-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--steel);
  border-radius: 2px;
  color: var(--steel);
}
.section-dark .chip { border-color: var(--ink-3); color: var(--aluminum); }

/* ============ Steps ============ */

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-left: 3rem; }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0; top: 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--blueprint-light);
  border: 1px solid var(--blueprint);
  width: 2.1rem; height: 2.1rem;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.step h4 { font-size: 1.05rem; text-transform: uppercase; margin-bottom: 0.4rem; }
.step p { color: var(--aluminum); font-size: 0.92rem; }

/* ============ Gallery ============ */

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 860px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gallery-grid { grid-template-columns: 1fr; } }

.gallery-item {
  aspect-ratio: 4/3;
  background: var(--ink-2);
  border: 1px solid var(--paper-2);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--steel-light);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-align: center;
  padding: 1rem;
  gap: 0.4rem;
}
.gallery-item strong { color: var(--aluminum); font-family: var(--font-body); font-weight: 600; font-size: 0.85rem; }

/* ============ Forms ============ */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.25rem; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--steel);
}
.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--aluminum);
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blueprint);
  box-shadow: 0 0 0 3px rgba(28, 90, 138, 0.15);
}
.field textarea { resize: vertical; min-height: 120px; }

.file-drop {
  border: 1.5px dashed var(--steel-light);
  border-radius: 4px;
  padding: 1.75rem 1.25rem;
  text-align: center;
  background: var(--paper);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.file-drop:hover, .file-drop.drag { border-color: var(--blueprint); background: var(--white); }
.file-drop input { display: none; }
.file-drop .ft { font-family: var(--font-mono); font-size: 0.78rem; color: var(--steel); text-transform: uppercase; letter-spacing: 0.04em; }
.file-drop .fs { font-size: 0.85rem; color: var(--steel-light); margin-top: 0.35rem; }
#file-list { margin-top: 0.75rem; font-family: var(--font-mono); font-size: 0.8rem; color: var(--blueprint); }

.form-note {
  font-size: 0.85rem;
  color: var(--steel);
  background: var(--paper-2);
  border-left: 3px solid var(--blueprint);
  padding: 0.85rem 1rem;
  margin-bottom: 1.5rem;
  border-radius: 0 2px 2px 0;
}

#form-status { margin-top: 1rem; font-family: var(--font-mono); font-size: 0.85rem; }
#form-status.ok { color: #1c7a4a; }
#form-status.err { color: #b3392c; }

/* ============ Footer ============ */

.site-footer {
  background: var(--ink);
  color: var(--aluminum);
  padding: 3rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--ink-3);
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blueprint-light);
  margin-bottom: 0.9rem;
}
.footer-col p, .footer-col a { font-size: 0.9rem; color: var(--aluminum); display: block; margin-bottom: 0.5rem; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--steel-light);
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ============ Page hero (interior pages) ============ */

.page-hero {
  background: var(--ink);
  color: var(--white);
  padding: 3.5rem 0 3rem;
}
.page-hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  text-transform: uppercase;
  font-weight: 900;
}
.page-hero p { color: var(--aluminum); max-width: 60ch; font-size: 1.05rem; margin-top: 0.75rem; }

/* ============ misc ============ */

.mt-lg { margin-top: 3rem; }
.center { text-align: center; }
.small { font-size: 0.85rem; color: var(--steel-light); }
