:root {
  --bg: #0f1419;
  --surface: #1a222c;
  --surface2: #243040;
  --text: #e8eef4;
  --muted: #9aa8b5;
  --accent: #3d8bfd;
  --accent2: #5eead4;
  --line: #2c3a4a;
  --warn: #fbbf24;
  --max: 1100px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
.banner {
  background: #3b2f14;
  color: #fde68a;
  font-size: 0.85rem;
  text-align: center;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid #78580f;
}
/* Header: one-line oval logo (img/proautotech-oval-line.svg, 15.96:1), menu row under it.
   The logo scrolls away; the menu row stays pinned at the top. */
.site-header { background: var(--bg); }
.header-inner { display: flex; justify-content: center; padding: 1.1rem 1.25rem 0.9rem; }
.brand { display: block; width: 100%; max-width: 960px; text-decoration: none !important; }
.brand:hover { text-decoration: none !important; }
.brand-logo { display: block; width: 100%; height: auto; }
.site-nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(15,20,25,0.95);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 0.5rem 0.6rem; padding: 0.55rem 1.25rem; font-size: 0.95rem;
}
/* Nav: every item is an oval outline like the logo; the current page is filled */
nav a {
  display: inline-block; padding: 0.3rem 0.95rem; border: 2px solid #0A74DE; border-radius: 999px;
  background: #fff; color: #0A74DE; font-weight: 600; line-height: 1.3; white-space: nowrap;
  transition: background-color 0.15s, color 0.15s;
}
nav a:hover, nav a:focus-visible { background: #dbeafe; color: #0A74DE; text-decoration: none; }
nav a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
nav a[aria-current="page"], nav a[aria-current="page"]:hover { background: #0A74DE; color: #fff; }
@media (max-width: 640px) {
  .header-inner { padding: 0.75rem 0.75rem 0.6rem; }
  .nav-inner { gap: 0.4rem 0.4rem; padding: 0.5rem 0.5rem; font-size: 0.85rem; }
  nav a { padding: 0.25rem 0.7rem; }
}
/* Buttons: ovals matching the nav. Primary = filled blue; secondary = blue outline on white */
.btn {
  display: inline-block; background: #0A74DE; color: #fff !important;
  padding: 0.6rem 1.3rem; border: 2px solid #0A74DE; border-radius: 999px;
  font: inherit; font-weight: 700; line-height: 1.3;
  text-decoration: none !important; cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn:hover, .btn:focus-visible { background: #0862bd; border-color: #0862bd; }
.btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.btn.secondary { background: #fff; border-color: #0A74DE; color: #0A74DE !important; }
.btn.secondary:hover, .btn.secondary:focus-visible { background: #dbeafe; border-color: #0A74DE; }
.hero { padding: 2.5rem 0 2rem; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; margin: 0 0 1rem; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 40rem; margin: 0 0 1.5rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.section { padding: 2.25rem 0; border-top: 1px solid var(--line); }
.section h2 { margin: 0 0 1rem; font-size: 1.45rem; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.grid-equip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 0; overflow: hidden;
  display: flex; flex-direction: column;
}
.card .card-body { padding: 1.1rem 1.25rem 1.25rem; }
.card h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
ul.clean { margin: 0; padding-left: 1.1rem; color: var(--muted); }
ul.clean li { margin: 0.35rem 0; }
.steps { display: grid; gap: 0.75rem; }
.step {
  display: grid; grid-template-columns: 2rem 1fr; gap: 0.75rem;
  align-items: start; background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 0.9rem 1rem;
}
.step .n {
  background: var(--surface2); color: var(--accent2); font-weight: 700;
  width: 2rem; height: 2rem; border-radius: 999px; display: grid; place-items: center;
  font-size: 0.9rem;
}
.cta-band {
  background: linear-gradient(135deg, #1a2a3d, #14352f);
  border: 1px solid var(--line); border-radius: 12px; padding: 1.75rem;
  margin: 2rem 0;
}
.cta-band h2 { margin-top: 0; }
.meta { color: var(--muted); font-size: 0.92rem; }
footer {
  border-top: 1px solid var(--line); padding: 1.75rem 0 2.5rem;
  color: var(--muted); font-size: 0.9rem;
}
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem;
}
.footer-brand { display: inline-flex; line-height: 0; }
.footer-logo { height: 48px; width: auto; }
.footer-contact { display: flex; flex-direction: column; gap: 0.1rem; line-height: 1.4; }
.footer-contact a { color: var(--text); }
.footer-social { display: flex; gap: 0.6rem; margin-left: auto; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  color: var(--muted); border: 1px solid var(--line);
  transition: color 0.15s, border-color 0.15s;
}
.footer-social a:hover, .footer-social a:focus-visible { color: var(--text); border-color: var(--accent); text-decoration: none; }
@media (max-width: 640px) {
  .footer-inner { flex-direction: column; justify-content: center; text-align: center; gap: 1rem; }
  .footer-contact { align-items: center; }
  .footer-social { margin-left: 0; }
}
.machine {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 1.25rem; margin: 1rem 0;
  display: grid; gap: 1rem;
}
@media (min-width: 720px) {
  .machine.has-media {
    grid-template-columns: 220px 1fr;
    align-items: start;
  }
}
.machine h3 { margin: 0 0 0.35rem; }
.machine .tag {
  display: inline-block; font-size: 0.75rem; color: var(--warn);
  border: 1px solid #78580f; background: #3b2f14; padding: 0.15rem 0.45rem;
  border-radius: 4px; margin-bottom: 0.5rem;
}
form.quote {
  display: grid; gap: 0.85rem; max-width: 36rem;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 1.25rem;
}
label { display: grid; gap: 0.35rem; font-size: 0.9rem; color: var(--muted); }
input, textarea, select {
  font: inherit; padding: 0.55rem 0.65rem; border-radius: 6px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text);
}
textarea { min-height: 110px; resize: vertical; }
.note {
  font-size: 0.85rem; color: var(--muted); background: var(--surface2);
  border-left: 3px solid var(--accent); padding: 0.65rem 0.85rem; margin: 1rem 0;
}

/* Sample images */
.media {
  position: relative;
  overflow: hidden;
  background: var(--surface2);
  border-radius: 10px;
  border: 1px solid var(--line);
}
.media img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
  object-fit: cover;
}
.media.hero-media {
  margin: 0 0 1.5rem;
  max-height: 420px;
}
.media.hero-media img {
  width: 100%;
  height: min(420px, 56vw);
  object-fit: cover;
}
.media.card-media {
  border: none; border-radius: 0; border-bottom: 1px solid var(--line);
  aspect-ratio: 16 / 10;
}
.media.card-media img { width: 100%; height: 100%; object-fit: cover; }
.media.equip-media {
  border-radius: 8px;
  aspect-ratio: 4 / 3;
}
.media.equip-media img { width: 100%; height: 100%; object-fit: cover; }
.media.about-media {
  margin: 1.25rem 0 0;
  max-height: 360px;
}
.media.about-media img {
  width: 100%;
  height: min(360px, 50vw);
  object-fit: cover;
}
.sample-badge {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 2;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #f1f5f9;
  background: rgba(15, 20, 25, 0.72);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  pointer-events: none;
  backdrop-filter: blur(2px);
}
.equip-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.equip-tile .tile-body { padding: 0.85rem 1rem 1rem; }
.equip-tile h3 { margin: 0 0 0.25rem; font-size: 0.98rem; }
.equip-tile p { margin: 0; color: var(--muted); font-size: 0.88rem; }

/* Process capability sections */
.process-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.25rem;
  margin: 1rem 0;
}
.process-block h3 { margin: 0 0 0.65rem; font-size: 1.1rem; }
.process-block .process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}
/* Long parts, welding, marking: photos keep their full frame (portrait + wide) in one row of equal height */
.process-block .long-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1rem;
}
.media.long-media {
  border-radius: 8px;
  flex: var(--grow, 1) 1 0;
  aspect-ratio: var(--ar, 4 / 3);
  min-width: 0;
}
.media.long-media img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 640px) {
  .media.long-media { flex-basis: 100%; }
}
.check-group {
  display: grid;
  gap: 0.45rem;
  padding: 0.35rem 0;
}
.check-group .check {
  display: flex; align-items: center; gap: 0.55rem;
  color: var(--text); font-size: 0.95rem;
}
.check-group input[type="checkbox"] {
  width: 1.05rem; height: 1.05rem; accent-color: var(--accent);
}
.example-box {
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.9rem 1rem;
  margin: 0.75rem 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.example-box strong { color: var(--text); }

/* Quote form: file list, status, thank-you, honeypot */
form.quote [hidden], .quote-thanks[hidden], .note[hidden] { display: none !important; }
.form-hint { margin: -0.5rem 0 0; font-size: 0.82rem; color: var(--muted); }
.file-list {
  list-style: none; margin: 0; padding: 0.5rem 0.75rem;
  background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
  display: grid; gap: 0.25rem; font-size: 0.88rem;
}
.file-list li { display: flex; justify-content: space-between; gap: 1rem; color: var(--text); }
.file-list li span:first-child { overflow-wrap: anywhere; }
.file-list .size { color: var(--muted); white-space: nowrap; }
.file-list .total { border-top: 1px solid var(--line); padding-top: 0.3rem; margin-top: 0.15rem; color: var(--muted); }
.file-list .over, .file-list .over .size { color: var(--warn); }
.form-status {
  margin: 0; font-size: 0.9rem; padding: 0.6rem 0.8rem; border-radius: 6px;
  background: var(--surface2); border-left: 3px solid var(--accent); color: var(--text);
}
.form-status.error { border-left-color: var(--warn); color: #fde68a; background: #3b2f14; }
.btn:disabled { opacity: 0.6; cursor: wait; filter: none; }
.quote-thanks {
  max-width: 36rem; background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--accent2); border-radius: 10px; padding: 1.25rem;
}
.quote-thanks:focus { outline: none; }
.quote-thanks h2 { margin: 0 0 0.5rem; font-size: 1.25rem; }
.quote-thanks p { margin: 0; color: var(--muted); }
.hp-field {
  position: absolute !important; left: -10000px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
}

/* Long parts section only: tall plank photo on the left, bullets + beam photo on the right */
.long-block .long-layout {
  display: grid;
  grid-template-columns: minmax(120px, 16%) 1fr;
  gap: 0.85rem;
  align-items: stretch;
}
.long-block .long-plank { border-radius: 8px; min-height: 260px; }
.long-block .long-plank img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 30%;
}
.long-block .long-main { display: flex; flex-direction: column; min-width: 0; }
.long-block .long-main ul.clean { list-style-position: inside; padding-left: 0; margin: 0 0 0.85rem; }
.long-block .long-main ul.clean li { margin-top: 0; }
.long-block .long-beam { border-radius: 8px; aspect-ratio: 1600 / 450; margin-top: auto; }
.long-block .long-beam img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 640px) {
  .long-block .long-layout { display: flex; flex-direction: column; }
  .long-block .long-main { display: contents; }
  .long-block .long-main ul.clean { order: 1; margin-bottom: 0; list-style-position: outside; padding-left: 1.1rem; }
  .long-block .long-plank { order: 2; min-height: 0; aspect-ratio: 860 / 1600; max-height: 560px; }
  .long-block .long-beam { order: 3; margin-top: 0; }
}

/* Multi-axis section only: responsive 16:9 YouTube embed under the photos */
.multiaxis-block .video-embed { margin: 1rem 0 0; }
.multiaxis-block .video-frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  background: var(--surface2); border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
}
.multiaxis-block .video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.multiaxis-block .video-embed figcaption { margin-top: 0.45rem; color: var(--muted); font-size: 0.88rem; }

/* Rigid tapping / Sheet & panel cutting: single photo kept to a moderate size */
.process-block .process-grid.single-photo { grid-template-columns: minmax(0, 560px); }

/* Building panels section: tall OSB photo beside two stacked drywall photos */
.process-block .panels-mosaic { display: flex; gap: 0.85rem; margin-top: 1rem; max-width: 820px; align-items: stretch; }
.panels-mosaic .panels-tall { flex: 0 0 42%; border-radius: 8px; min-width: 0; }
.panels-mosaic .panels-stack { flex: 1 1 0; display: flex; flex-direction: column; gap: 0.85rem; min-width: 0; }
.panels-mosaic .panels-wide { border-radius: 8px; }
.panels-mosaic .media img { width: 100%; height: 100%; object-fit: cover; }
.panels-mosaic .panels-tall img { position: absolute; inset: 0; object-position: 50% 50%; }
@media (max-width: 640px) {
  .process-block .panels-mosaic { flex-direction: column; }
  .panels-mosaic .panels-tall { flex: none; aspect-ratio: 862 / 1600; max-height: 620px; }
}

/* Knife & wheel cutting: 2x2 grid of 2:1 TPO photos */
.process-block .tpo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; margin-top: 1rem; }
.tpo-grid .tpo-media { border-radius: 8px; aspect-ratio: 2 / 1; }
.tpo-grid .tpo-media img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 640px) { .process-block .tpo-grid { grid-template-columns: 1fr; } }

/* Multi-axis: struts row full width; angle-head row narrower so both rows are about the same height */
.process-block .long-grid.multiaxis-angle { max-width: 60%; }
.long-grid .long-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 640px) { .process-block .long-grid.multiaxis-angle { max-width: none; } }

/* Width-capped photo rows: keep full-frame rows near the same height as the other rows on desktop */
.process-block .long-grid.w86 { max-width: 86%; }  /* Precision milling: 3D-milling lead + deep bore */
.process-block .long-grid.w66 { max-width: 66%; }  /* Marking & engraving, row 1 (three portraits) */
.process-block .long-grid.w90 { max-width: 90%; }  /* Engineering: CAM programming, row 1 (3D strut toolpaths) */
.process-block .long-grid.w92 { max-width: 92%; }  /* Marking & engraving, row 2 (logo, MDF emblem, side engraving) */
.process-block .long-grid.w76 { max-width: 76%; }  /* Something BIG updates: 5-axis photo pair */
@media (max-width: 640px) {
  .process-block .long-grid.w86,
  .process-block .long-grid.w66,
  .process-block .long-grid.w90,
  .process-block .long-grid.w92,
  .process-block .long-grid.w76 { max-width: none; }
}

/* Engineering page top image: CAD viewport shot shown full frame (no crop), width-capped */
.media.about-media.cad-media { max-height: none; max-width: 820px; }
.media.about-media.cad-media img { height: auto; }
/* Modeling page top image: exploded plate assembly render, full frame */
.media.about-media.cad-media.layers-media { max-width: 640px; }

/* Home Engineering card: CAM screenshot has wide black margins, zoom in on the strut */
.media.card-media.card-zoom img { transform: scale(1.3); transform-origin: 44% 54%; }

/* Something BIG: dated update log, newest first */
.update-log .update-entry { margin: 0 0 1.25rem; }
.update-entry h2 { margin: 0.1rem 0 0.6rem; font-size: 1.35rem; }
.update-entry p { margin: 0 0 0.5rem; }
.update-entry .update-date { color: var(--accent2); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; margin: 0; }

/* Home 3D Modeling card: show the whole render (letterboxed on the render's own navy background) */
.media.card-media.card-contain { background: #00003f; }
.media.card-media.card-contain img { object-fit: contain; }
