/* =========================================================
   Fabela Precision Solutions — shared stylesheet (Direction B)
   White header with the full-color logo; dark navy body.
   Brand colors come from the logo files: blue #0000A9, red #D10001.
   ========================================================= */

:root {
  --navy: #0a1530;        /* page background */
  --panel: #13234a;       /* raised sections, cards */
  --rule: #24376b;        /* lines on dark */
  --deep: #060d1f;        /* footer */
  --text: #ffffff;
  --muted: #b8c2d6;       /* secondary text on dark */
  --soft: #d3dae8;        /* lede text on dark */
  --red: #d10001;         /* logo red: primary actions */
  --red-dark: #a80001;
  --blue: #0000a9;        /* logo blue: accents on white */
  --paper: #dbdbdb;       /* part-photo backdrop */

  --display: "Saira Condensed", "Arial Narrow", sans-serif;
  --body: "Saira", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1320px;
  --gutter: clamp(20px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--navy);
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--text); text-underline-offset: 3px; }
a:hover { color: var(--muted); }
:focus-visible { outline: 3px solid #ffb4b4; outline-offset: 3px; }

h1, h2, h3 { font-family: var(--display); line-height: 1; margin: 0 0 0.4em; letter-spacing: 0; }
h1 { font-weight: 800; font-size: clamp(3rem, 6.4vw, 5.4rem); line-height: 0.98; }
h2 { font-weight: 800; font-size: clamp(2.3rem, 4vw, 3.4rem); }
h3 { font-weight: 700; font-size: 1.75rem; line-height: 1.1; }
p { margin: 0 0 1em; max-width: 66ch; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.lede { font-size: 1.25rem; color: var(--soft); max-width: 40ch; }
.muted { color: var(--muted); }
.section { padding: clamp(72px, 9vw, 120px) 0; }
.section-panel { background: var(--panel); }
.section-head { margin-bottom: 44px; }
.section-head p { color: var(--muted); }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff; padding: 10px 16px; z-index: 100; }
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font: 600 1rem/1 var(--body);
  padding: 16px 26px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-outline { border-color: #fff; color: #fff; background: transparent; }
.btn-outline:hover { background: #fff; color: var(--navy); }

/* ---------- Header (white, full-color logo) ---------- */
.site-header { background: #fff; border-bottom: 4px solid var(--red); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 90px; }
.brand img { height: 62px; width: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.site-nav a { display: block; padding: 10px 13px; color: var(--navy); text-decoration: none; font-weight: 600; }
.site-nav a:hover { color: var(--blue); }
.site-nav a[aria-current="page"] { color: var(--blue); box-shadow: inset 0 -3px 0 var(--blue); }
.site-nav .btn { margin-left: 12px; padding: 13px 20px; }
.site-nav a.btn-primary, .site-nav a.btn-primary:hover, .site-nav a.btn-primary[aria-current="page"] { color: #fff; box-shadow: none; }
.nav-toggle { display: none; background: none; border: 2px solid var(--navy); font: 600 0.95rem var(--body); color: var(--navy); padding: 9px 14px; cursor: pointer; }

@media (max-width: 1020px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 4px solid var(--red); padding: 8px var(--gutter) 20px; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; }
  .site-nav a { padding: 14px 4px; border-bottom: 1px solid #e3e6ec; }
  .site-nav a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--blue); padding-left: 14px; }
  .site-nav .btn { margin: 14px 0 0; }
  .brand img { height: 50px; }
}

/* ---------- Page intro (inner pages) ---------- */
.page-intro { padding: clamp(64px, 8vw, 104px) 0 clamp(48px, 6vw, 72px); border-bottom: 1px solid var(--rule); }
.page-intro h1 { max-width: 14ch; }

/* ---------- Cert / fact bar ---------- */
.factbar { background: var(--panel); border-top: 4px solid var(--red); }
.factbar .wrap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.factbar .wrap > div { padding: 28px 24px; border-left: 1px solid var(--rule); }
.factbar .wrap > div:first-child { border-left: 0; padding-left: 0; }
.factbar strong { display: block; font: 700 1.65rem/1.15 var(--display); }
.factbar span { color: var(--muted); font-size: 0.94rem; }
@media (max-width: 860px) {
  .factbar .wrap { grid-template-columns: 1fr 1fr; }
  .factbar .wrap > div { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); }
  .factbar .wrap > div:nth-child(-n+2) { border-top: 0; }
}

/* ---------- Cards with photos ---------- */
.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.card { background: var(--panel); text-decoration: none; color: #fff; display: block; }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--paper); }
.card div { padding: 20px 22px 24px; }
.card h3 { margin-bottom: 6px; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
a.card:hover h3 { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 960px) { .card-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) {
  .card-grid { gap: 10px; }
  .card div { padding: 12px 12px 16px; }
  .card h3 { font-size: 1.25rem; }
  .card p { font-size: 0.85rem; }
}

/* ---------- Part gallery ---------- */
.parts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 2px; }
.parts-grid figure { margin: 0; background: var(--paper); }
.parts-grid img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

/* ---------- Equipment rows ---------- */
.equip { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 56px); align-items: start; padding: 48px 0; border-bottom: 1px solid var(--rule); }
.equip:first-child { padding-top: 0; }
.equip-photo { background: #fff; padding: 20px; }
.equip-photo img { width: 100%; max-height: 300px; object-fit: contain; }
.equip .kind { color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.equip h2, .equip h3 { font-size: clamp(2rem, 3vw, 2.6rem); }
.equip .media { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (max-width: 820px) { .equip { grid-template-columns: 1fr; gap: 20px; } .equip-photo img { max-height: 200px; } }

/* ---------- Video ---------- */
.video { position: relative; background: #000; aspect-ratio: 16 / 9; }
.video video, .video iframe, .video img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.video button {
  position: absolute; inset: 0; width: 100%; height: 100%;
  background: linear-gradient(rgba(6,13,31,0) 50%, rgba(6,13,31,0.75));
  border: 0; cursor: pointer; color: #fff; padding: 0;
  display: flex; align-items: flex-end; justify-content: flex-start;
}
.video button span { display: inline-flex; align-items: center; gap: 10px; margin: 18px; background: var(--red); padding: 12px 18px; font: 600 1rem var(--body); }
.video button:hover span { background: var(--red-dark); }
.video button svg { width: 16px; height: 16px; fill: currentColor; }
.video .unavailable { position: absolute; left: 16px; bottom: 16px; background: rgba(6,13,31,0.85); padding: 8px 12px; font-size: 0.9rem; color: var(--soft); }
.video-caption { font-size: 0.9rem; color: var(--muted); margin: 8px 0 0; }

/* ---------- Big stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
.stats > div { border-top: 2px solid var(--red); padding-top: 24px; }
.stats p.num { color: #fff; font: 800 clamp(3rem, 5vw, 4rem)/1 var(--display); margin: 0 0 8px; }
.stats h3 { font-size: 1.6rem; }
.stats p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .stats { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- Photo band ---------- */
.photo-band { position: relative; background: #000; }
.photo-band img { width: 100%; height: clamp(380px, 42vw, 560px); object-fit: cover; opacity: 0.55; }
.photo-band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6,13,31,0.92) 0%, rgba(6,13,31,0.6) 45%, rgba(6,13,31,0) 80%); }
.photo-band .wrap { z-index: 1; }
@media (max-width: 700px) { .photo-band::after { background: linear-gradient(0deg, rgba(6,13,31,0.95) 0%, rgba(6,13,31,0.8) 55%, rgba(6,13,31,0.35) 100%); } }
.photo-band .wrap { position: absolute; left: 0; right: 0; bottom: 0; padding-bottom: 56px; }
.photo-band h2 { max-width: 16ch; }
.photo-band p { color: var(--soft); max-width: 50ch; }

/* ---------- RFQ band ---------- */
.rfq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.drop { border: 2px dashed #5c74b3; padding: 40px; text-align: center; background: var(--navy); }
.drop strong { display: block; font: 700 1.7rem/1.1 var(--display); margin-bottom: 6px; }
.drop p { color: var(--muted); font-size: 0.95rem; margin: 0 auto 22px; }
@media (max-width: 860px) { .rfq { grid-template-columns: 1fr; } }

/* ---------- Two-column split ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ---------- Steps (a real sequence) ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.steps li { border-top: 2px solid var(--rule); padding-top: 20px; }
.steps .n { color: var(--muted); font-weight: 600; margin: 0 0 4px; }
.steps p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
label .opt { font-weight: 400; color: var(--muted); }
input, textarea, select { width: 100%; font: inherit; color: #0a1530; padding: 12px 14px; border: 1px solid #7d8cb0; background: #fff; }
input:focus, textarea:focus { outline: 3px solid #7fa0ff; outline-offset: 0; }
textarea { min-height: 160px; resize: vertical; }
input[type="file"] { background: var(--panel); color: #fff; border: 2px dashed #5c74b3; padding: 18px; }
.hint { font-size: 0.88rem; color: var(--muted); margin: 6px 0 0; }
.hidden-field { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--deep); color: var(--muted); padding: 64px 0 32px; font-size: 0.98rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.4fr; gap: 48px; }
.footer-logo { display: inline-block; background: #fff; padding: 12px 16px; margin-bottom: 18px; }
.footer-logo img { height: 48px; width: auto; }
.site-footer h2 { font-size: 1.4rem; color: #fff; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer address { font-style: normal; }
.subscribe { display: flex; gap: 8px; margin-top: 10px; }
.subscribe .btn { flex: none; padding: 14px 20px; }
.footer-base { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--rule); font-size: 0.88rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; gap: 36px; } }
@media (max-width: 420px) { .subscribe { flex-direction: column; } }

/* ---------- In-page jump links ---------- */
.jump { display: flex; flex-wrap: wrap; gap: 0 24px; font-weight: 600; }
.jump a { display: inline-block; padding: 12px 0; }

/* =========================================================
   Light sections: used wherever photos have light backgrounds,
   so machines float on white and parts float on steel grey.
   ========================================================= */
.section-light { background: #ffffff; color: var(--navy); }
.section-steel { background: #e3e4e6; color: var(--navy); }
.section-light a, .section-steel a { color: var(--navy); }
.section-light a:hover, .section-steel a:hover { color: var(--blue); }
.section-light .muted, .section-steel .muted,
.section-light .section-head p, .section-steel .section-head p,
.section-light .lede, .section-steel .lede { color: #3f4a63; }
.section-light .btn-outline, .section-steel .btn-outline { border-color: var(--navy); color: var(--navy); }
.section-light .btn-outline:hover, .section-steel .btn-outline:hover { background: var(--navy); color: #fff; }
.section-light .btn-primary, .section-steel .btn-primary { color: #fff; }

/* Part photos fade at the edges so they sit on the steel background */
.fade { -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent 100%); mask-image: radial-gradient(closest-side, #000 55%, transparent 100%); }

/* Market cards on steel: no boxes, just the part and its label */
.section-steel .card { background: transparent; color: var(--navy); }
.section-steel .card img { background: transparent; aspect-ratio: 1 / 1; }
.section-steel .card div { padding: 4px 4px 0; border-top: 2px solid var(--navy); }
.section-steel .card p { color: #3f4a63; }

/* Parts gallery on steel */
.section-steel .parts-grid { gap: 12px; }
.section-steel .parts-grid figure { background: transparent; }

/* Equipment on white: the machine floats, no frame */
.section-light .equip { border-bottom-color: #d5d9e0; }
.section-light .equip-photo { background: transparent; padding: 0; }
.section-light .equip .kind { color: #3f4a63; }
.section-light .video-caption { color: #3f4a63; }
.section-light .section-head { border-bottom: 0; }

/* Machine lineup strip (homepage) */
.machine-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.machine-strip a { text-decoration: none; display: block; }
.machine-strip img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; }
.machine-strip h3 { font-size: 1.45rem; margin: 10px 0 2px; }
.machine-strip p { margin: 0; color: #3f4a63; font-size: 0.95rem; }
.machine-strip a:hover h3 { color: var(--blue); }
@media (max-width: 860px) { .machine-strip { grid-template-columns: 1fr 1fr; gap: 20px 14px; } }
.section-steel .parts-grid img { transform: scale(1.15); }

/* ---------- Footer: white, so the full-color logo sits directly on it ---------- */
.site-footer { background: #ffffff; color: #3f4a63; border-top: 4px solid var(--red); }
.site-footer a { color: var(--navy); }
.site-footer a:hover { color: var(--blue); }
.site-footer h2 { color: var(--navy); }
.footer-logo { background: transparent; padding: 0; }
.footer-logo img { height: 64px; }
.site-footer input { border-color: #9aa3b5; }
.footer-base { border-top-color: #d5d9e0; color: #5a6478; }

/* ---------- Inner-page intro text uses more of the width ---------- */
.page-intro .lede { max-width: 62ch; }

/* ---------- Job listings (Careers) ---------- */
.jobs { display: grid; gap: 16px; margin-top: 28px; }
.job {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 40px; align-items: center;
  background: #fff; border: 1px solid #d5d9e0; border-left: 4px solid var(--red); padding: 28px 32px;
}
.job .kind { color: #3f4a63; font-weight: 600; margin: 0 0 4px; }
.job h3 { margin: 0 0 8px; font-size: clamp(1.6rem, 2.4vw, 2rem); }
.job p { margin: 0; color: #3f4a63; }
.job .btn { white-space: nowrap; }
@media (max-width: 700px) {
  .job { grid-template-columns: 1fr; padding: 24px 20px; }
  .job .btn { width: 100%; }
}
.section-light.jobs-section { background: #ffffff; }
.jobs-section .job { background: #f7f8fa; }
