/* BLOCHTECH Engineering. One stylesheet, no build step. */

:root {
  color-scheme: light dark;
  --paper: #fbfaf7;
  --paper-2: #f1efe9;
  --ink: #143a59;
  --ink-2: #55616d;
  --line: #d3d0c7;
  --accent: #d6411a;
  --brand: #f26722;        /* the logo's orange and grey, from the old site's logo; --accent is a darker shade small text can use */
  --brand-grey: #5d6367;
  --navy: #1d4f76;
  --accent-ink: #ffffff;
  --sans: "Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --wrap: 72rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d1620;
    --paper-2: #121e2b;
    --ink: #e7ebf0;
    --ink-2: #9fadbd;
    --line: #2b3b4d;
    --accent: #ff7a4d;
    --brand-grey: #9fadbd;
    --accent-ink: #0d1620;
    --navy: #163d5c;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 4rem; /* the sticky header's height, so a menu link lands with no strip of the section above */ -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.6 var(--sans);
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.015em; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 1.5rem; }

.skip { position: absolute; left: -999rem; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--ink); color: var(--paper); padding: .5rem .75rem; }

/* Header */

.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 2rem; padding-block: .85rem; }

.wordmark { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; }
.mark { width: 2.4rem; height: 2.25rem; }
.mark-dot { fill: var(--brand); }
.mark-grey { fill: var(--brand-grey); }
.wordmark-text { display: grid; line-height: 1; }
.wordmark-text b { font-weight: 800; letter-spacing: .06em; font-size: 1.25rem; color: var(--brand); }
.wordmark-text span { font-weight: 700; letter-spacing: .3em; font-size: .62rem; text-transform: uppercase; color: var(--brand-grey); margin-top: .25rem; }

nav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.5rem; font-size: .95rem; }
nav a { text-decoration: none; padding-block: .25rem; border-bottom: 2px solid transparent; }
nav a:hover { border-bottom-color: var(--accent); }
nav .nav-cta { border: 1px solid var(--ink); padding: .3rem .8rem; border-radius: 3px; }
nav .nav-cta:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Hero */

.hero {
  padding-block: clamp(3rem, 8vw, 6rem) 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 2.5rem 2.5rem;
  background-position: center top;
  position: relative;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 40%, var(--paper) 35%, color-mix(in srgb, var(--paper) 78%, transparent) 100%);
}
.hero > * { position: relative; }

.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }

.eyebrow, .sheet, .num, dt {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2);
}
.eyebrow { color: var(--accent); margin-bottom: 1.25rem; }

h1 { font-size: clamp(2.2rem, 4.6vw, 3.5rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.02; }
.lede { margin-top: 1.5rem; font-size: 1.2rem; color: var(--ink-2); max-width: 34rem; }

.actions { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; }
.button {
  display: inline-block; background: var(--accent); color: var(--accent-ink);
  padding: .8rem 1.3rem; border-radius: 3px; font-weight: 700; text-decoration: none;
}
.button:hover { filter: brightness(1.1); }
.text-link { font-weight: 600; text-underline-offset: .3em; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }

/* Schematic */

.schematic { border: 1px solid var(--line); background: var(--paper); border-radius: 4px; padding: .5rem; }
.schematic svg { display: block; width: 100%; height: auto; }
.process * { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.process .thin { stroke-width: 1.5; }
.process .paper, .instrument circle { fill: var(--paper); }
.instrument * { stroke: var(--ink); stroke-width: 1.5; }
.signal { fill: none; stroke: var(--ink-2); stroke-width: 1.2; stroke-dasharray: 5 5; }
.signal path { fill: none; }
.signal.hot { stroke: var(--brand); stroke-width: 2; animation: flow 1.2s linear infinite; }
.fill-ink { fill: var(--ink); }
.tag text { font: 500 11px var(--mono); fill: var(--ink); letter-spacing: .04em; }
.tag .tag-strong { font-weight: 700; font-size: 12px; }
.pulse { fill: var(--brand); animation: pulse 2s ease-in-out infinite; }

@keyframes flow { to { stroke-dashoffset: -10; } }
@keyframes pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) {
  .signal.hot, .pulse { animation: none; }
  html { scroll-behavior: auto; }
}

/* Title block: the strip of facts under the hero, set out like a drawing's title block */

.title-block {
  margin-top: clamp(3rem, 7vw, 5rem);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--ink); border-bottom: 0; background: var(--paper);
}
.title-block > div { padding: 1rem 1.25rem; border-right: 1px solid var(--ink); }
.title-block > div:last-child { border-right: 0; }
.title-block dd { font-weight: 700; margin-top: .3rem; }

/* Sections */

.section { padding-block: clamp(5rem, 10vw, 7.5rem); border-top: 1px solid var(--ink); }
.section.alt { background: var(--paper-2); border-top-color: var(--line); }
.section.alt + .section { border-top-color: var(--line); }

.section-head { max-width: 40rem; margin-bottom: 3rem; }
.sheet { margin-bottom: 1rem; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); font-weight: 800; }
.section-head > p:not(.sheet):not(.actions) { margin-top: 1rem; color: var(--ink-2); font-size: 1.1rem; }

.grid { display: grid; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.grid > * { padding: 1.75rem 1.5rem 2rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grid h3 { font-size: 1.2rem; font-weight: 700; }
.grid p:not(.num):not(.award) { margin-top: .6rem; color: var(--ink-2); font-size: 1rem; }

.services { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.services .num { color: var(--accent); margin-bottom: 2.5rem; }
.industries { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pic { display: block; width: 7.5rem; height: 4rem; margin-bottom: 1.25rem; color: var(--ink); }
.pic * { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pic .hot, .pic .hot * { stroke: var(--brand); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.split .section-head { margin-bottom: 0; }

.tags { display: flex; flex-wrap: wrap; gap: .6rem; padding-top: 1rem; }
.tags li { font-family: var(--mono); font-size: .85rem; border: 1px solid var(--line); border-radius: 3px; padding: .45rem .8rem; }


.also { margin-top: 2.5rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem 2.5rem; color: var(--ink-2); font-size: 1rem; }
.also li { padding-left: 1.3rem; position: relative; }
.also li::before { content: ""; position: absolute; left: 0; top: .72em; width: .7rem; height: 2px; background: var(--brand); }

/* Projects */

.projects { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.projects article { display: flex; flex-direction: column; }
.projects article { padding: 0; }
.projects .shot { display: block; width: 100%; height: auto; aspect-ratio: 285 / 200; object-fit: cover; }
/* A project with no photo gets a drawing in the same slot, so the cards stay level. */
.projects .shot-drawn { display: grid; place-items: center; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.shot-drawn .pic { margin: 0; width: 9rem; height: 4.8rem; }
.card-body { flex: 1; display: flex; flex-direction: column; padding: 1.5rem 1.5rem 2rem; }
.banner { display: block; width: 100%; height: auto; aspect-ratio: 1920 / 520; object-fit: cover; margin-bottom: 2rem; border: 1px solid var(--line); }
.projects .num { color: var(--accent); margin-bottom: 1rem; }
.projects .scope { color: var(--ink); }
.projects dl { margin-top: auto; padding-top: 2rem; display: grid; gap: .6rem; }
.projects dd { font-size: .95rem; font-weight: 600; margin-top: .1rem; }
.projects p.award { margin-top: 1rem; align-self: start; font-family: var(--mono); font-size: .78rem; letter-spacing: .06em; color: var(--accent-ink); background: var(--accent); padding: .25rem .55rem; border-radius: 2px; }

/* Awards band: the striped navy band from the capability statements */

.band {
  padding-block: clamp(5rem, 10vw, 7.5rem); color: #fff;
  background: repeating-linear-gradient(var(--navy) 0 7px, color-mix(in srgb, var(--navy) 82%, #fff) 7px 8px);
}
.band .sheet { color: #c9d6e2; }
.band h2 { color: #fff; }
.awards { margin-top: 2.5rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.awards > div { background: var(--navy); border: 1px solid rgb(255 255 255 / .35); padding: 1.75rem 1.5rem; }
.awards .sheet { color: #ff9d7a; margin-bottom: 0; }
.awards h3 { margin-top: .8rem; font-size: 1.2rem; }
.awards p:not(.sheet) { margin-top: .5rem; color: #dbe4ec; }

.sheet.sub { margin-top: 3.25rem; }
.vendors > div { grid-template-columns: 7rem 1fr; }
.vendors dd { font-weight: 400; }
.vendors dt { color: var(--accent); font-weight: 700; }
.quiet { font-weight: 400; color: var(--ink-2); font-size: .95rem; }

/* Certifications. The logos have white grounds, so each sits on a white tile in both themes. */

.certs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.certs img { display: block; width: 100%; height: auto; background: #fff; padding: .6rem; border: 1px solid var(--line); border-radius: 3px; }
.certs p { margin-top: .6rem; font-size: .9rem; color: var(--ink-2); }

/* People */

.people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.people li { border-top: 2px solid var(--brand); padding-top: 1rem; }
.people h3 { font-size: 1.3rem; }
.people p { margin-top: .35rem; color: var(--ink-2); }

/* Contact */

.contact-block { border: 1px solid var(--ink); }
.contact-block > div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--ink); }
.contact-block > div:last-child { border-bottom: 0; }
.contact-block dt { padding-top: .3rem; }
.contact-block dd { font-weight: 600; overflow-wrap: anywhere; }
.contact-block a { text-underline-offset: .25em; text-decoration-color: var(--accent); }

/* Footer */

.site-footer { border-top: 1px solid var(--ink); font-size: .9rem; color: var(--ink-2); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding-block: 1.5rem; }

/* Error page */

.error { min-height: 60vh; display: grid; align-content: center; padding-block: 5rem; }
.error p { margin-top: 1rem; color: var(--ink-2); }

/* Narrow screens */

@media (max-width: 62rem) {
  .services, .projects, .also { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .title-block { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .title-block > div:nth-child(2) { border-right: 0; }
  .title-block > div:nth-child(-n+2) { border-bottom: 1px solid var(--ink); }
}

@media (max-width: 48rem) {
  .hero-grid, .split { grid-template-columns: minmax(0, 1fr); }
  .split { gap: 3rem; }
  .industries { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  nav a:not(.nav-cta) { display: none; }
}

@media (max-width: 34rem) {
  .certs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wrap { padding-inline: 1.1rem; }
  .services, .industries, .projects, .also, .awards, .people { grid-template-columns: minmax(0, 1fr); }
  .services .num { margin-bottom: 1rem; }
}
