:root {
  color-scheme: light;
  --paper: #f8f8f2;
  --ink: #181a17;
  --body: #4b4e46;
  --line: #d8d9cf;
  --red: #c73523;
  --red-dark: #a82a1b;
  --blue: #344d5a;
  --graphite: #73796a;
  --sans: "Helvetica Neue", Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

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

html { scroll-padding-top: 1.5rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 var(--sans); }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { display: block; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
[hidden] { display: none !important; }
::selection { background: #f7c8bf; color: var(--ink); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 5px; }

.wrap { width: min(100% - clamp(2.5rem, 8vw, 7rem), 84rem); margin-inline: auto; }

.skip-link {
  position: absolute;
  z-index: 5;
  inset: .5rem auto auto .5rem;
  padding: .65rem 1rem;
  transform: translateY(-160%);
  background: var(--ink);
  color: #fff;
}

.skip-link:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid var(--line); }

.header-inner {
  min-height: 4.75rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
}

.wordmark {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font: 700 1.62rem/1 var(--sans);
  letter-spacing: -.07em;
}

.wordmark img { flex: none; object-fit: contain; }
.brand-domain { color: var(--red); }
.site-nav { display: flex; align-items: center; gap: clamp(1.5rem, 3vw, 2.8rem); }
.site-nav a, .footer-top { padding-block: .45rem; font-size: .92rem; font-weight: 550; }
.site-nav a:hover, .footer-top:hover { color: var(--red); }
.header-contact { justify-self: end; }
.menu-button, .mobile-contact { display: none; }

.button {
  min-height: 3.18rem;
  width: fit-content;
  padding: .7rem 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: .91rem;
  font-weight: 650;
  line-height: 1.2;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

.button-small { min-height: 2.52rem; padding-inline: .95rem; }
.button-dark { background: var(--ink); color: var(--paper); }
.button-dark:hover { background: #383c35; }
.button-red { background: var(--red); color: #fff; }
.button-red:hover { background: var(--red-dark); }
.button-outline { border-color: #c5c7bb; }
.button-outline:hover { border-color: var(--ink); background: #ebede4; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4.3vw, 4.3rem);
  align-items: center;
  padding-block: clamp(3.5rem, 6.1vw, 6rem) clamp(3.5rem, 6.5vw, 6.4rem);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: .68rem;
  color: var(--red);
  font: 500 .82rem/1.35 var(--mono);
  letter-spacing: .085em;
  text-transform: uppercase;
}

.eyebrow > span { width: 1.32rem; height: 1px; flex: none; background: currentColor; }

h1, h2, h3 { text-wrap: balance; }

h1 {
  margin-block: 1.33rem 1.35rem;
  font-size: clamp(3.8rem, 6.44vw, 7rem);
  font-weight: 650;
  line-height: .97;
  letter-spacing: -.075em;
  text-wrap: initial;
}

h1 em { color: var(--red); font-style: normal; }

.hero-description {
  max-width: 28rem;
  color: var(--body);
  font-size: clamp(1.06rem, 1.33vw, 1.24rem);
  line-height: 1.55;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.7rem; }

.hero-figure {
  min-width: 0;
  border: 1px solid #d2d5c9;
  background: #f2f3eb;
  box-shadow: 0 12px 35px #272b1d08;
}

.hero-plot {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1.43;
  overflow: hidden;
  background-color: #f4f5ed;
  background-image:
    linear-gradient(to right, #777f6510 1px, transparent 1px),
    linear-gradient(to bottom, #777f6510 1px, transparent 1px),
    radial-gradient(ellipse at 53% 46%, #fff9 0, #fff0 72%);
  background-size: 1.5rem 1.5rem, 1.5rem 1.5rem, 100% 100%;
  background-position: center;
}

.plot-axis {
  position: absolute;
  inset: 50% 1.15rem auto;
  border-top: 1px dashed #90978166;
  z-index: -1;
}

#braid-canvas { position: absolute; top: 3%; left: 3%; width: 94%; height: 94%; }

.plot-corner { position: absolute; width: .75rem; height: .75rem; color: #7c826f; }
.plot-nw { top: .9rem; left: .9rem; border-top: 1px solid; border-left: 1px solid; }
.plot-ne { top: .9rem; right: .9rem; border-top: 1px solid; border-right: 1px solid; }
.plot-sw { bottom: .9rem; left: .9rem; border-bottom: 1px solid; border-left: 1px solid; }
.plot-se { bottom: .9rem; right: .9rem; border-bottom: 1px solid; border-right: 1px solid; }

.plot-caption {
  min-height: 2.85rem;
  padding: .65rem .8rem;
  border-top: 1px solid #d2d5c9;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  column-gap: clamp(.8rem, 2.5vw, 2.1rem);
  row-gap: .4rem;
  font: 500 .74rem/1.4 var(--mono);
  letter-spacing: .015em;
  color: #454b40;
}

.plot-caption > span { display: flex; align-items: center; gap: .43rem; }
.plot-caption i { display: inline-block; width: .77rem; height: 2px; background: var(--graphite); }
.plot-caption .key-red { background: var(--red); }
.plot-caption .key-blue { background: var(--blue); }

.services {
  border-top: 1px solid var(--line);
  padding-block: clamp(3rem, 5.4vw, 5rem) clamp(4rem, 7.2vw, 7rem);
}

.section-intro {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.4rem 3rem;
}

h2 {
  margin-top: .75rem;
  font-size: clamp(3rem, 5.1vw, 5.35rem);
  font-weight: 650;
  line-height: 1;
  letter-spacing: -.075em;
}

.section-intro > p { max-width: 24.5rem; color: var(--body); padding-bottom: .2rem; }
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  margin-top: 2.55rem;
  background: #f4f5ed;
}

.service-card {
  min-width: 0;
  min-height: 19rem;
  display: flex;
  flex-direction: column;
  padding: clamp(1.3rem, 2.35vw, 2.2rem);
}

.service-card + .service-card { border-left: 1px solid var(--line); }
.service-card h3, .approach-list h3 { font-size: clamp(1.35rem, 2vw, 1.86rem); line-height: 1.1; letter-spacing: -.05em; }
.service-card > p:not(.service-output) { color: var(--body); margin-top: .8rem; margin-bottom: 1.9rem; max-width: 27rem; }

.service-mark { position: relative; width: 2.8rem; height: 2.8rem; margin-bottom: 1.55rem; color: var(--red); }
.service-mark span { position: absolute; display: block; }
.mark-engineering span { width: .86rem; height: .86rem; border: 1.5px solid; transform: skewY(-18deg); }
.mark-engineering span:nth-child(1) { top: .18rem; left: .25rem; }
.mark-engineering span:nth-child(2) { top: .18rem; left: 1.34rem; background: currentColor; }
.mark-engineering span:nth-child(3) { top: 1.27rem; left: .25rem; }
.mark-engineering span:nth-child(4) { top: 1.27rem; left: 1.34rem; }
.mark-research span:nth-child(1) { width: 2.04rem; height: 2.04rem; border: 1.5px solid; border-radius: 50%; }
.mark-research span:nth-child(2) { inset: .39rem auto auto .39rem; width: 1.25rem; height: 1.25rem; border: 1px solid; border-radius: 50%; }
.mark-research span:nth-child(3) { inset: .95rem auto auto .95rem; height: .18rem; width: .18rem; border-radius: 50%; background: currentColor; }
.mark-research span:nth-child(4) { width: 1.36rem; height: 1px; background: currentColor; transform: rotate(-42deg); top: .56rem; left: .79rem; }
.mark-evaluation span:nth-child(1) { inset: .04rem auto auto .15rem; width: 2.08rem; height: 2.08rem; border: 1.5px solid; }
.mark-evaluation span:nth-child(2) { top: .48rem; left: .55rem; width: 1.25rem; height: 1px; background: currentColor; }
.mark-evaluation span:nth-child(3) { top: .97rem; left: .55rem; width: .78rem; height: 1px; background: currentColor; }
.mark-evaluation span:nth-child(4) { top: 1.48rem; left: .55rem; width: 1.25rem; height: 1px; background: currentColor; }

.service-output {
  margin-top: auto;
  padding-top: .74rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .3rem .78rem;
  font-size: .88rem;
  font-weight: 600;
}

.service-output span { color: #62675a; font: 500 .72rem/1.5 var(--mono); text-transform: uppercase; letter-spacing: .035em; }

.evaluation { background: #191e1b; color: var(--paper); }
.eval-grid {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: clamp(2rem, 7vw, 7rem);
  padding-block: clamp(4rem, 8vw, 7.5rem);
}

.evaluation .eyebrow { color: #ff8d78; }
.evaluation :focus-visible { outline-color: #ff8d78; }
.eval-intro > p:not(.eyebrow) { color: #c7cdc4; max-width: 26rem; margin-top: 1.24rem; }
.eval-intro .eval-note { display: none; font-size: .92rem; }
.has-js .eval-intro .eval-note { display: block; }

.harness { min-width: 0; border: 1px solid #4b554c; border-radius: 6px; overflow: hidden; background: #232a25; }
.harness-title {
  min-height: 3.4rem;
  display: flex;
  align-items: center;
  gap: .66rem;
  padding: .75rem 1.15rem;
  border-bottom: 1px solid #465046;
  font: 500 .83rem/1.4 var(--mono);
  color: #e8ede3;
}

.harness-icon { display: grid; grid-template-columns: repeat(2, 3px); gap: 2px; }
.harness-icon i { display: block; width: 3px; height: 3px; background: #ff8d78; }

.case-selector {
  display: none;
  flex-wrap: wrap;
  gap: .35rem;
  padding: .8rem .9rem;
  border-bottom: 1px solid #465046;
}

.has-js .case-selector { display: flex; }
.case-selector button {
  cursor: pointer;
  min-height: 2.22rem;
  color: #e0e5dc;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  padding: .32rem .58rem;
  font-size: .83rem;
  line-height: 1.35;
  text-align: left;
}

.case-selector button:hover { background: #303a32; }
.case-selector button[aria-pressed="true"] { background: #38463a; border-color: #637566; color: #fff; }
.case-body { padding: .15rem 1.15rem 1.12rem; }
.case-details > div {
  min-height: 3.52rem;
  padding-block: .78rem;
  display: grid;
  grid-template-columns: 7.1rem minmax(0, 1fr);
  gap: .3rem .75rem;
  align-items: start;
  border-bottom: 1px solid #465046;
}

.case-details dt { padding-top: .15rem; color: #c2cbbf; font: 400 .76rem/1.4 var(--mono); }
.case-details dd { font-size: .92rem; line-height: 1.45; }
.case-result { display: flex; align-items: baseline; gap: .65rem; margin-top: .9rem; color: #d0d9cd; font-size: .85rem; }

.case-status {
  flex: none;
  padding: .15rem .45rem;
  border: 1px solid #975d50;
  border-radius: 3px;
  background: #472f29;
  color: #ffb4a5;
  font: 500 .72rem/1.5 var(--mono);
  text-transform: uppercase;
}

.case-status[data-result="pass"] { background: #2d4635; border-color: #668e72; color: #c8f1cf; }

.approach {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  align-items: start;
  gap: 2rem clamp(3rem, 7vw, 7.6rem);
  padding-block: clamp(4rem, 7.5vw, 7rem);
}

.approach-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.approach-list li { position: relative; border-bottom: 1px solid var(--line); padding: 1.37rem 0 1.37rem 1.6rem; }
.approach-list li::before { content: ""; position: absolute; inset: 1.72rem auto auto .12rem; width: .43rem; height: .43rem; transform: rotate(45deg); background: var(--red); }
.approach-list h3 { text-wrap: pretty; }
.approach-list p { max-width: 31rem; margin-top: .46rem; color: var(--body); }

.contact { background: var(--red); color: #fff; }
.contact-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(0, .84fr);
  align-items: end;
  gap: 2rem clamp(2rem, 7vw, 7rem);
  padding-block: clamp(3.5rem, 6.5vw, 6rem);
}

.contact .eyebrow { color: #fff; }
.contact :focus-visible { outline-color: #fff; }
.contact h2 { font-size: clamp(3.2rem, 6vw, 6.3rem); }
.contact-details p { max-width: 19rem; margin-bottom: 1.13rem; }
.button-paper { background: var(--paper); color: var(--ink); }
.button-paper:hover { background: #f3dbd3; }
.footer-inner { min-height: 6rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.site-footer .wordmark { font-size: 1.35rem; }
.site-footer p, .footer-top { color: var(--body); font-size: .85rem; }

@media (min-width: 54.001rem) {
  .hero h1 em { white-space: nowrap; }
}

@media (max-width: 65rem) {
  .hero { gap: 2rem; }
  h1 { font-size: clamp(3.4rem, 7.1vw, 5.6rem); }
  .service-card { min-height: 20rem; }
}

@media (max-width: 54rem) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 2.4rem; padding-block: 3.3rem 3.6rem; }
  .hero-figure { width: min(100%, 41rem); }
  .hero h1 { font-size: clamp(3.8rem, 11vw, 6rem); }
  .hero-description { max-width: 32rem; }
  .eval-grid { grid-template-columns: minmax(0, 1fr); }
  .eval-intro > p:not(.eyebrow) { max-width: 36rem; }
  .eval-intro h2 br { display: none; }
  .approach { gap: 2rem 3.4rem; }
}

@media (max-width: 42rem) {
  .header-inner {
    min-height: 4.12rem;
    position: relative;
    grid-template-columns: 1fr auto;
    gap: .5rem 1rem;
  }

  .menu-button {
    align-items: center;
    gap: .58rem;
    min-height: 2.6rem;
    padding: .34rem .3rem .34rem .7rem;
    border: 0;
    color: var(--ink);
    background: transparent;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
  }

  .has-js .menu-button { display: inline-flex; }
  .menu-button span {
    position: relative;
    width: .8rem;
    height: .44rem;
    border-block: 1px solid currentColor;
  }

  .menu-button[aria-expanded="true"] span { border-bottom: 0; height: 1px; }
  .header-contact { display: none; }
  .site-nav { grid-column: 1 / -1; flex-wrap: wrap; gap: .25rem 1.2rem; padding-bottom: .8rem; }
  .mobile-contact { display: inline; }
  .has-js .site-nav { display: none; }
  .has-js .menu-button[aria-expanded="true"] + .site-nav { display: flex; }
  .hero h1 { font-size: clamp(3.1rem, 11.7vw, 4.8rem); }
  .hero-description { font-size: 1.06rem; }
  .section-intro { align-items: start; flex-direction: column; }
  .service-grid { grid-template-columns: minmax(0, 1fr); margin-top: 1.65rem; }
  .service-card { min-height: initial; gap: 0; }
  .service-card + .service-card { border-left: 0; border-top: 1px solid var(--line); }
  .service-mark { margin-bottom: 1rem; }
  .service-card > p:not(.service-output) { margin-bottom: 1.35rem; }
  .approach, .contact-inner { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 25rem) {
  .header-inner { gap: .5rem; }
  .wordmark { font-size: 1.5rem; }
  .wordmark img { width: 1.65rem; height: 1.65rem; }
  .hero { gap: 2rem; }
  .hero h1 { font-size: clamp(2.65rem, 11.9vw, 3.25rem); }
  .hero-actions .button { padding-inline: .72rem; font-size: .85rem; }
  .plot-caption { padding-inline: .4rem; gap: .55rem; font-size: .66rem; }
  .plot-caption i { width: .57rem; }
  .case-details > div { grid-template-columns: minmax(0, 1fr); }
  .footer-inner { gap: .55rem; flex-wrap: wrap; padding-block: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
