/* KJ Engineering & Consulting
   Brand: logo maroon on white, steel and charcoal neutrals taken from the hero photograph.
   Layout: white logo header, full-bleed photo hero with a dark caption band, then a two-column
   introduction and full-width content bands on a 1180px container.
   The site commits to a single light look so the maroon logo always sits on white. */
:root {
  --bg: #ffffff;
  --band: #f3f4f5;
  --ink: #1d2024;
  --ink-soft: #565d65;
  --rule: #dcdfe3;
  --brand: #7a0000;
  --brand-dark: #5c0000;
  --brand-soft: #f6eaea;
  --charcoal: #1f2327;
  --on-dark: #f5f6f7;
  --on-dark-soft: #b4bac1;
  --overlay: rgba(24, 27, 31, 0.74);
  --error: #b3261e;
  --display: "Inter", "Helvetica Neue", Arial, sans-serif;
  --body: "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;
  --wrap: 1180px;
  --stack: clamp(32px, 4vw, 56px); /* gap between the intro, who-we-work-with and services blocks */
  color-scheme: light;
}

* { 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;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
p { margin: 0; }
a { color: var(--brand); text-underline-offset: 3px; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

/* Type */
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
  color: var(--ink);
}
h2 { font-size: clamp(1.55rem, 2.8vw, 2rem); }
h3 { font-size: 1.08rem; letter-spacing: 0; }
.eyebrow {
  font-family: var(--display);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
}
.lede { font-size: 1.1rem; color: var(--ink-soft); max-width: 62ch; }
.muted { color: var(--ink-soft); }

/* Header */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  padding-block: 14px;
}
.brand { display: block; flex: none; }
.brand img { height: 60px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-nav a.link {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: none;
  padding: 8px 14px;
}
.site-nav a.link:hover { color: var(--brand); }
.site-nav a.link[aria-current="page"] { color: var(--brand); box-shadow: inset 0 -2px 0 var(--brand); }

/* Header laid over the hero photo; scrolls away with it */
.site-header.over-hero {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding-top: env(safe-area-inset-top, 0px);
  background: linear-gradient(rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.6) 65%, rgba(255, 255, 255, 0)) no-repeat;
  border-bottom-color: transparent;
}
.site-header.over-hero ~ main .hero.short img { height: clamp(280px, 30vw, 380px); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  background: var(--brand);
  color: var(--on-dark);
  border: 1px solid var(--brand);
  padding: 12px 22px;
  text-decoration: none;
  cursor: pointer;
  border-radius: 2px;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.secondary:hover { background: var(--ink); color: var(--on-dark); }
.btn.light { background: var(--on-dark); color: var(--brand); border-color: var(--on-dark); }
.btn.light:hover { background: var(--bg); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* Photo hero with caption band */
.hero {
  position: relative;
  background: var(--charcoal);
  overflow: hidden;
}
.hero img {
  width: 100%;
  height: clamp(260px, 32vw, 440px);
  object-fit: cover;
  object-position: 60% 45%;
}
.hero.short img { height: clamp(200px, 22vw, 280px); object-position: 60% 30%; }
.hero-band {
  position: absolute;
  inset: auto 0 0 0;
  background: var(--overlay);
}
.hero-band .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-block: clamp(12px, 1.8vw, 20px);
}
.hero-band .wrap::before {
  content: "";
  width: 6px;
  align-self: stretch;
  background: var(--brand);
  flex: none;
}
.hero h1 {
  color: var(--on-dark);
  font-weight: 400;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Introduction */
.intro .wrap { padding-block: clamp(48px, 7vw, 88px) var(--stack); }
.intro + .section { padding-block: 0 var(--stack); }
.intro h1, .section-title {
  color: var(--brand);
  font-weight: 500;
  font-size: clamp(1.5rem, 2.8vw, 2.05rem);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.22;
}
.intro-body { display: grid; gap: 16px; min-width: 0; }
.intro-body p { color: var(--ink-soft); text-align: justify; }
.intro-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* Sections */
.section { padding-block: clamp(56px, 8vw, 96px); }
.section.band { background: var(--band); }
.section-head { display: grid; gap: 10px; margin-bottom: 36px; max-width: 66ch; }

.section-title { margin-bottom: 16px; }
.section-text { color: var(--ink-soft); text-align: justify; }

/* Numbered two-column services list */
#services { padding-block: 0 var(--stack); scroll-margin-top: 28px; }
#process { padding-top: 0; }
#process .process { margin-top: 20px; }
.services {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(32px, 5vw, 64px);
  border-top: 2px solid var(--brand);
  counter-reset: service;
}
.services li {
  counter-increment: service;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 64px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  min-width: 0;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--ink);
}
.services li::before {
  content: counter(service, decimal-leading-zero);
  flex: none;
  width: 2.2em;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}

.process {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
  counter-reset: step;
}
.process li { display: grid; gap: 8px; align-content: start; min-width: 0; padding-top: 16px; border-top: 2px solid var(--ink); counter-increment: step; }
.process li::before { content: "0" counter(step); font-family: var(--display); font-weight: 700; font-size: 0.85rem; color: var(--brand); }
.process p { font-size: 0.92rem; color: var(--ink-soft); }

.prose { display: grid; gap: 14px; max-width: 62ch; }


/* Contact page */
.contact-intro { margin-bottom: 20px; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(32px, 6vw, 72px); }
.details { display: grid; gap: 22px; align-content: start; }
.detail { display: grid; gap: 4px; padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
.detail:last-child { border-bottom: 0; }
.detail .label { font-family: var(--display); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand); }
.detail .value { font-size: 1.05rem; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.copy {
  font: 500 0.75rem var(--body);
  background: none;
  border: 1px solid var(--rule);
  color: var(--ink-soft);
  padding: 3px 9px;
  cursor: pointer;
  border-radius: 2px;
}
.copy:hover { color: var(--ink); border-color: var(--ink-soft); }

.form-card { border: 1px solid var(--rule); border-top: 3px solid var(--brand); padding: clamp(20px, 4vw, 36px); background: var(--bg); min-width: 0; }
form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; min-width: 0; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
label, .field-label { font-size: 0.88rem; font-weight: 600; color: var(--ink); }
label .opt, .field-label .opt { font-weight: 400; color: var(--ink-soft); }
input, select, textarea {
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 11px 12px;
  width: 100%;
}
input:hover, select:hover, textarea:hover { border-color: var(--ink-soft); }
textarea { min-height: 150px; resize: vertical; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dropzone {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 22px 16px;
  border: 1px dashed var(--ink-soft);
  border-radius: 2px;
  background: var(--band);
  text-align: center;
  cursor: pointer;
}
.dropzone:hover, .dropzone.dragging { border-color: var(--brand); background: var(--brand-soft); }
.dropzone:focus-within { outline: 2px solid var(--brand); outline-offset: 3px; }
.dz-title { font-size: 0.95rem; font-weight: 600; }
.dz-title u { color: var(--brand); text-underline-offset: 3px; }
.dz-hint { font-size: 0.82rem; font-weight: 400; color: var(--ink-soft); }
.file-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.file-list li { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 1px solid var(--rule); font-size: 0.9rem; }
.file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { flex: none; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.form-msg { font-size: 0.95rem; }
.form-msg.error { color: var(--error); }
.privacy { font-size: 0.82rem; color: var(--ink-soft); }
.status { padding: 18px 20px; background: var(--brand-soft); border-left: 3px solid var(--brand); }

/* Footer */
.site-footer { background: var(--charcoal); color: var(--on-dark-soft); font-size: 0.9rem; }
.site-footer .wrap { display: grid; gap: 28px; padding-block: 48px 32px; }
.foot-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.foot-logo { height: 46px; width: auto; margin-bottom: 14px; }
.foot-cols h3 { color: var(--on-dark); font-size: 0.95rem; margin-bottom: 8px; }
.foot-cols a { color: var(--on-dark); text-decoration: none; }
.foot-cols a:hover { text-decoration: underline; }
.foot-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }

/* Responsive */
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .process { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
}
@media (max-width: 640px) {
  .brand img { height: 42px; }
  .site-header .wrap { justify-content: center; }
  .services, .process, .pair { grid-template-columns: 1fr; }
  .foot-cols { grid-template-columns: 1fr; }
}
.copyright { border-top: 1px solid var(--ink-soft); padding-top: 20px; font-size: 0.82rem; }
