@font-face {
  font-family: "Archivo";
  src: url("/assets/archivo-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/ibm-plex-mono-400.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/ibm-plex-mono-600.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  --bakelite: #191713;
  --label: #e1d8c7;
  --brass: #bd9850;
  --verdigris: #5d8a79;
  --unlit: #454038;
  --oxblood: #7a2a22;
  --dim-label: #a69d8c;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  background: var(--bakelite);
  color: var(--label);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(rgba(176, 141, 70, .025) 1px, transparent 1px) 0 0 / 100% 56px,
    var(--bakelite);
  font-family: "Archivo", Arial, sans-serif;
  font-size: clamp(1rem, .96rem + .2vw, 1.125rem);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: var(--label); text-underline-offset: .24em; text-decoration-color: var(--brass); }
a:hover { color: #fff8e9; }

button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 4px; }

.shell {
  width: min(100% - clamp(32px, 6vw, 112px), 1480px);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--label);
  color: var(--bakelite);
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  min-height: 116px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  width: auto;
  color: var(--label);
  text-decoration: none;
}
.brand img { width: 50px; height: 50px; flex: 0 0 auto; }
.brand-name {
  display: grid;
  line-height: .88;
  text-transform: uppercase;
  letter-spacing: .085em;
  font-stretch: 118%;
}
.brand-name strong {
  font-size: 1rem;
  font-weight: 810;
}
.brand-name > span {
  margin-top: 6px;
  color: #bdb3a2;
  font-family: "IBM Plex Mono", monospace;
  font-size: .69rem;
  letter-spacing: .18em;
}
.plate-id, .eyebrow, .trace-stamp, .panel-status, .department-code, .site-footer {
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: .09em;
  font-size: .72rem;
}
.plate-id { color: var(--dim-label); }

.opening {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, .65fr);
  gap: clamp(24px, 4vw, 72px);
  align-items: end;
  padding-bottom: clamp(72px, 10vw, 144px);
}

.hero-plate {
  position: relative;
  min-height: min(62vw, 720px);
  overflow: hidden;
  border: 1px solid rgba(176, 141, 70, .55);
  border-radius: 4px 28px 4px 4px;
  background: #0d0c0a;
}

.hero-plate::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(20,18,15,.92) 0%, rgba(20,18,15,.06) 55%);
  pointer-events: none;
}

.hero-plate > img {
  width: 100%;
  height: 100%;
  position: absolute;
  object-fit: cover;
  object-position: 42% center;
}

.hero-caption {
  position: absolute;
  z-index: 1;
  left: clamp(20px, 4vw, 64px);
  right: clamp(20px, 4vw, 64px);
  bottom: clamp(22px, 4vw, 58px);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--brass);
}

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 {
  font-stretch: 118%;
  line-height: .98;
  text-wrap: balance;
}

h1 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(1.85rem, 1.7vw + .8rem, 3.15rem);
  font-weight: 760;
  letter-spacing: -.035em;
}

.status-readout {
  margin: 0 0 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: .72rem;
  border-top: 1px solid var(--brass);
  opacity: 0;
  transform: translateY(10px);
  animation: resolve .32s var(--ease) .12s forwards;
}

.status-readout div {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(176, 141, 70, .34);
}
.status-readout dt { color: var(--dim-label); text-transform: uppercase; }
.status-readout dd { margin: 0; color: var(--label); }

@keyframes resolve {
  to { opacity: 1; transform: none; }
}

.pipeline-section {
  padding-block: clamp(72px, 8vw, 128px);
  border-top: 1px solid rgba(176, 141, 70, .38);
  background: #1d1a16;
  box-shadow: 0 0 0 100vmax #1d1a16;
  clip-path: inset(0 -100vmax);
}

.section-intro {
  max-width: 880px;
  margin-bottom: clamp(54px, 7vw, 100px);
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 2.5vw + .7rem, 4.8rem);
  font-weight: 760;
  letter-spacing: -.035em;
}

.pipeline-instrument {
  position: relative;
  min-height: 220px;
}

.pipeline-instrument::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: -8px;
  left: 0;
  right: 0;
  border-top: 1px dashed #5e584e;
}

.pipeline {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(8px, 1.8vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.stage button {
  position: relative;
  width: 100%;
  min-height: 100px;
  display: grid;
  grid-template-areas: "index state" "name name";
  gap: 12px;
  align-content: space-between;
  padding: clamp(12px, 1.4vw, 20px);
  color: var(--label);
  border: 1px solid var(--brass);
  border-radius: 4px 14px 4px 4px;
  background: rgba(20, 18, 15, .92);
  font-family: "IBM Plex Mono", monospace;
  text-align: left;
  cursor: default;
  transition: background .24s var(--ease), border-color .24s var(--ease), font-weight .24s var(--ease);
}

.stage button::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 50%;
  width: 8px;
  height: 8px;
  border: 2px solid #71695c;
  border-radius: 50%;
  background: var(--bakelite);
  transform: translateX(-50%);
}
.stage-live button::before {
  border-color: var(--label);
  background: var(--verdigris);
  box-shadow: 0 0 0 3px rgba(78, 122, 107, .22);
}

.stage-live button { background: var(--verdigris); border-color: #82a899; color: #fff8e9; }
.stage-dark button { border-style: dashed; border-color: #736b5e; color: #aaa18f; }
.stage-index { grid-area: index; color: inherit; opacity: .72; font-size: .68rem; }
.stage-state { grid-area: state; justify-self: end; text-transform: uppercase; font-size: .62rem; letter-spacing: .08em; }
.stage-name { grid-area: name; font-weight: 600; text-transform: uppercase; font-size: clamp(.76rem, 1vw, .95rem); }
.stage.pulse button { font-weight: 700; background: #5c8b7a; }

.stage > p {
  max-width: 25ch;
  margin: 14px 4px 0;
  color: var(--dim-label);
  font-size: .84rem;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity .24s var(--ease), transform .24s var(--ease);
}
.stage:hover > p, .stage:focus-within > p { opacity: 1; transform: none; }

.trace-layer {
  position: absolute;
  z-index: 3;
  top: -22px;
  left: 0;
  right: 0;
  height: 30px;
  pointer-events: none;
}

#signal-trace { width: 100%; height: 100%; display: block; }
.static-trace {
  position: absolute;
  left: 0;
  top: 14px;
  width: calc((100% - 5 * clamp(8px, 1.8vw, 28px)) / 3 + clamp(8px, 1.8vw, 28px));
  border-top: 2px solid var(--label);
}
.js .static-trace { display: none; }

.trace-stamp {
  margin: 26px 0 0;
  color: var(--dim-label);
}

.work {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(320px, .72fr);
  gap: clamp(48px, 9vw, 150px);
  padding-block: clamp(88px, 11vw, 176px);
  border-top: 1px solid rgba(176, 141, 70, .38);
}

.work-copy {
  max-width: 620px;
  padding-top: 36px;
  font-size: clamp(1.08rem, 1vw + .7rem, 1.45rem);
}
.work-copy p:last-child { color: var(--dim-label); margin-bottom: 0; }

.hiring {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(420px, 1fr);
  gap: clamp(44px, 8vw, 128px);
  padding-block: clamp(88px, 11vw, 176px);
  background: #171511;
  box-shadow: 0 0 0 100vmax #171511;
  clip-path: inset(0 -100vmax);
}

.hiring-copy > h2 { margin-bottom: clamp(54px, 7vw, 92px); }
.department {
  position: relative;
  padding: 28px 0 34px 28px;
  border-left: 3px solid var(--brass);
}
.department + .department { margin-top: 22px; border-left-color: var(--verdigris); }
.department-code { color: var(--dim-label); }
.department h3 { margin-bottom: 14px; font-size: clamp(1.5rem, 2vw, 2.25rem); letter-spacing: -.025em; }
.department p:not(.department-code) { max-width: 54ch; color: var(--dim-label); }
.department a { font-size: .9rem; font-weight: 650; }

.application-panel {
  align-self: start;
  padding: clamp(22px, 3vw, 44px);
  border: 1px solid rgba(176, 141, 70, .7);
  border-radius: 4px 28px 4px 4px;
  background: #1a1814;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}
.panel-status { color: #82a899; }

form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 18px;
}
.field-wide { grid-column: 1 / -1; }
.field label {
  display: block;
  margin-bottom: 7px;
  font-family: "IBM Plex Mono", monospace;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.field label span { color: var(--dim-label); text-transform: none; }

input, select, textarea {
  width: 100%;
  border: 1px solid #615b50;
  border-radius: 3px;
  padding: 12px 13px;
  background: #100f0c;
  color: var(--label);
  transition: border-color .2s var(--ease);
}
textarea { resize: vertical; min-height: 126px; }
input:hover, select:hover, textarea:hover { border-color: var(--brass); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #b85b50; }
.field-error { min-height: 1.15em; margin: 5px 0 0; color: #e58b80; font-size: .75rem; }

.submit-button {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid var(--brass);
  border-radius: 3px;
  background: var(--brass);
  color: var(--bakelite);
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.submit-button:hover { background: var(--label); }
.submit-button:disabled { cursor: wait; opacity: .65; }

.email-fallback, .noscript-note, .form-result {
  margin: 26px 0 0;
  padding-top: 20px;
  border-top: 1px solid #514b41;
  font-size: .86rem;
  color: var(--dim-label);
}
.form-result { color: var(--label); }
.form-result h3 { font-size: 1.6rem; }

.close {
  padding-block: clamp(100px, 15vw, 220px);
  border-top: 1px solid rgba(176, 141, 70, .38);
}
.dark-line {
  margin-bottom: clamp(48px, 7vw, 96px);
  color: var(--dim-label);
  font-family: "IBM Plex Mono", monospace;
  font-size: .82rem;
}
.close h2 {
  max-width: 1100px;
  font-weight: 520;
  font-size: clamp(2.4rem, 5vw, 7.5rem);
}

.site-footer {
  min-height: 112px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 28px;
  align-items: center;
  border-top: 1px solid rgba(176, 141, 70, .38);
  color: var(--dim-label);
}

@media (max-width: 900px) {
  .opening { grid-template-columns: 1fr; }
  .hero-plate { min-height: 70vw; }
  .status-readout { max-width: 600px; }
  .work, .hiring { grid-template-columns: 1fr; }
  .work-copy { padding-top: 0; }
  .hiring { gap: 72px; }
}

@media (max-width: 700px) {
  .site-header { min-height: 92px; }
  .brand img { width: 44px; height: 44px; }
  .plate-id { display: none; }
  .hero-plate { min-height: 480px; border-radius: 4px 20px 4px 4px; }
  .hero-plate > img { object-position: 35% center; }

  .pipeline-instrument { min-height: 0; }
  .pipeline-instrument::before {
    top: 0;
    bottom: 0;
    left: 19px;
    right: auto;
    border-top: 0;
    border-left: 1px dashed #5e584e;
  }
  .pipeline {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-left: 34px;
  }
  .stage { display: grid; grid-template-columns: minmax(0, 1fr); }
  .stage button { min-height: 86px; }
  .stage button::before {
    top: 28px;
    left: -22px;
  }
  .stage > p { max-width: none; opacity: 1; transform: none; margin-bottom: 0; }
  .trace-layer {
    top: 0;
    bottom: 0;
    left: 6px;
    right: auto;
    width: 28px;
    height: auto;
  }
  .static-trace {
    left: 13px;
    top: 0;
    width: auto;
    height: 31%;
    border-top: 0;
    border-left: 2px solid var(--label);
  }
  .stage-dark button { background: rgba(20,18,15,.94); }

  form { grid-template-columns: 1fr; }
  .field-wide, .submit-button { grid-column: auto; }
  .site-footer { grid-template-columns: 1fr; gap: 12px; padding-block: 28px; }
  .site-footer p { margin: 0; }
}

@media (max-width: 420px) {
  .shell { width: min(100% - 28px, 1480px); }
  .hero-plate { min-height: 455px; }
  .hero-caption { left: 18px; right: 18px; bottom: 22px; }
  h1 { font-size: clamp(1.75rem, 8.8vw, 2.55rem); }
  .status-readout div { grid-template-columns: 72px 1fr; gap: 8px; }
  .application-panel { margin-inline: -2px; padding: 20px 16px; }
  .site-footer { font-size: .65rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
  }
}
