:root {
  --paper: #fff;
  --ink: #090a0b;
  --impact: #ed006f;
  --line: rgba(9, 10, 11, 0.24);
  --gutter: clamp(1.15rem, 4vw, 4.75rem);
  --header-h: 5.25rem;
  --display: "Arial Black", "Helvetica Neue", Arial, sans-serif;
  font-family: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }

html { overflow-x: clip; scroll-behavior: smooth; }

body {
  min-width: 20rem;
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
}

a { color: inherit; }

a:focus-visible {
  outline: 4px solid var(--impact);
  outline-offset: 4px;
}

.research-skip {
  position: fixed;
  z-index: 400;
  top: 0;
  left: 1rem;
  padding: 0.8rem 1rem;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
  transform: translateY(-130%);
}

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

.research-header {
  position: fixed;
  z-index: 200;
  inset: 0 0 auto;
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  padding: 0.75rem var(--gutter);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
}

.research-brand {
  justify-self: start;
  display: grid;
  justify-items: center;
  font-style: italic;
  line-height: 0.75;
  text-decoration: none;
  transform: skewX(-5deg);
}

.research-brand span {
  font-family: var(--display);
  font-size: clamp(1.05rem, 1.8vw, 1.5rem);
  letter-spacing: -0.075em;
}

.research-brand small {
  margin-top: 0.4rem;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.3em;
}

.research-section {
  justify-self: center;
  font-size: 0.98rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-decoration: none;
}

.research-nav {
  justify-self: end;
  display: flex;
  gap: clamp(1rem, 2.5vw, 2.6rem);
  font-size: 0.98rem;
  font-weight: 800;
}

.research-nav a { text-underline-offset: 0.35em; }

.research-hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  padding: calc(var(--header-h) + clamp(2.8rem, 7vh, 6rem)) var(--gutter) clamp(3rem, 7vh, 5rem);
  border-bottom: 2px solid var(--ink);
  background: #fff;
}

.research-hero h1 {
  position: relative;
  z-index: 4;
  width: 100%;
  height: calc(100svh - var(--header-h) - clamp(5.8rem, 14vh, 11rem));
  margin: 0;
  font-family: var(--display);
  font-size: clamp(4.2rem, 10vw, 11.5rem);
  letter-spacing: -0.09em;
  line-height: 0.76;
}

.research-hero h1 span,
.research-hero h1 em {
  position: absolute;
  display: block;
  white-space: nowrap;
}

.research-hero__what { top: 0; left: 0; }

.research-hero__machines {
  top: 28%;
  left: 19%;
  font-size: 1.08em;
}

.research-hero__are {
  right: 38%;
  bottom: 12%;
  color: transparent;
  -webkit-text-stroke: 2px var(--ink);
}

.research-hero__learning {
  right: 0;
  bottom: 0;
  color: var(--impact);
  font-size: 0.78em;
  font-style: italic;
}

.research-hero__sheet {
  position: absolute;
  z-index: 2;
  top: 12%;
  right: 4%;
  width: min(29vw, 31rem);
  height: 48%;
  overflow: hidden;
  border: 2px solid var(--ink);
  background: #fff;
}

.research-hero__sheet::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 52%, rgba(237, 0, 111, 0.12) 52%, rgba(237, 0, 111, 0.12) 53%, transparent 53%);
}

.research-hero__sheet img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: grayscale(1) contrast(1.18);
}

.research-hero__wire {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
}

.research-hero__wire span,
.research-hero__wire i {
  position: absolute;
  display: block;
  background: var(--ink);
}

.research-hero__wire span { top: 21%; left: 0; width: 100%; height: 2px; }
.research-hero__wire i { top: 21%; right: 21%; width: 2px; height: 60%; }

.research-field {
  position: relative;
  height: 440svh;
  background: #fff;
}

.research-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  padding-top: var(--header-h);
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(9, 10, 11, 0.08) calc(50% - 1px), rgba(9, 10, 11, 0.08) 50%, transparent 50%),
    #fff;
}

.research-wiring {
  position: absolute;
  z-index: 1;
  inset: var(--header-h) 0 0;
  width: 100%;
  height: calc(100% - var(--header-h));
  overflow: visible;
  pointer-events: none;
}

.research-wiring path {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.research-wiring__black { stroke: var(--ink); stroke-width: 2; }
.research-wiring__magenta { stroke: var(--impact); stroke-width: 5; }

.research-pane {
  --tx: 0px;
  --ty: 0px;
  position: absolute;
  z-index: 3;
  display: grid;
  overflow: hidden;
  border: 2px solid var(--ink);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  transform: translate3d(var(--tx), var(--ty), 0);
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
  will-change: transform;
}

.research-pane h2,
.research-pane p { margin: 0; }

.research-pane h2 {
  position: relative;
  z-index: 2;
  padding: 0.8rem 0.9rem;
  border-bottom: 2px solid var(--ink);
  background: #fff;
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.25vw, 2.8rem);
  letter-spacing: -0.065em;
  line-height: 0.86;
}

.research-pane h2 em { color: var(--impact); font-style: italic; }

.research-pane figure {
  min-height: 0;
  margin: 0;
  overflow: hidden;
  background: #fff;
}

.research-pane img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: grayscale(1) contrast(1.14);
  transition: filter 180ms ease, transform 240ms ease;
}

.research-pane p {
  align-self: end;
  padding: 0.72rem 0.9rem;
  border-top: 2px solid var(--ink);
  background: #fff;
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.2;
}

.research-pane:hover,
.research-pane:focus-visible { z-index: 20; background: var(--ink); color: #fff; }

.research-pane:hover h2,
.research-pane:focus-visible h2,
.research-pane:hover p,
.research-pane:focus-visible p { background: var(--ink); color: #fff; }

.research-pane:hover img,
.research-pane:focus-visible img { filter: grayscale(0) contrast(1.08); transform: scale(1.025); }

.research-pane--sim {
  top: 13%;
  left: 4%;
  width: 32vw;
  height: 46vh;
  grid-template-rows: auto 1fr auto;
}

.research-pane--open {
  top: 11%;
  right: 4%;
  width: 28vw;
  height: 42vh;
  grid-template-rows: auto 1fr auto;
}

.research-pane--human {
  right: 7%;
  bottom: 5%;
  width: 35vw;
  height: 43vh;
  grid-template-columns: 0.78fr 1.22fr;
  grid-template-rows: 1fr auto;
}

.research-pane--human h2 { grid-row: 1; grid-column: 1; border-right: 2px solid var(--ink); border-bottom: 0; }
.research-pane.research-pane--human h2 { font-size: clamp(1rem, 1.2vw, 1.35rem); }
.research-pane--human figure { grid-row: 1; grid-column: 2; }
.research-pane--human p { grid-column: 1 / -1; }

.research-pane--body {
  left: 30%;
  bottom: 3%;
  width: 29vw;
  height: 38vh;
  grid-template-rows: auto 1fr auto;
}

.research-pane--reason {
  left: 2%;
  bottom: 6%;
  width: 25vw;
  height: 33vh;
  grid-template-rows: auto 1fr auto;
}

/* A fixed research wall: natural page scroll, deliberate overlap, real hover priority. */
.research-field {
  height: auto;
  padding: clamp(4rem, 6vw, 7rem) var(--gutter) clamp(6rem, 9vw, 10rem);
  border-bottom: 2px solid var(--ink);
}

.research-stage {
  position: relative;
  top: auto;
  width: min(100%, 92rem);
  min-height: clamp(62rem, 125svh, 78rem);
  margin: 0 auto;
  overflow: visible;
  padding: 0;
  background: #fff;
  isolation: isolate;
}

.research-wiring {
  inset: 0;
  width: 100%;
  height: 100%;
}

.research-pane {
  z-index: 4;
  opacity: 0;
  transform: translateY(2.5rem);
  transition:
    opacity 420ms ease,
    transform 320ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
  will-change: auto;
}

.research-pane.is-visible {
  opacity: 1;
  transform: none;
}

.research-pane--sim {
  top: 1%;
  left: 0;
  width: 39%;
  height: 29rem;
}

.research-pane--open {
  top: 6%;
  right: 0;
  width: 34%;
  height: 27rem;
}

.research-pane--human {
  z-index: 7;
  top: 31%;
  right: 25%;
  bottom: auto;
  width: 42%;
  height: 30rem;
}

.research-pane--body {
  right: 0;
  bottom: 2%;
  left: auto;
  width: 34%;
  height: 26rem;
}

.research-pane--reason {
  bottom: 7%;
  left: 2%;
  width: 29%;
  height: 23rem;
}

.research-stage:has(.research-pane:hover) .research-pane.is-visible:not(:hover),
.research-stage:has(.research-pane:focus-visible) .research-pane.is-visible:not(:focus-visible) {
  opacity: 0.42;
}

.research-pane.is-visible:hover,
.research-pane.is-visible:focus-visible {
  z-index: 50;
  border-color: var(--impact);
  transform: translateY(-0.55rem) scale(1.025);
}

.research-more {
  padding: clamp(5rem, 9vw, 10rem) var(--gutter);
  background: var(--ink);
  color: #fff;
}

.research-more > header {
  width: min(100%, 92rem);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(22rem, 0.95fr);
  gap: clamp(3rem, 5vw, 6rem);
  align-items: end;
  margin: 0 auto clamp(4rem, 7vw, 7rem);
}

.research-more > header > * {
  min-width: 0;
}

.research-more h2,
.research-more h3,
.research-more p {
  margin: 0;
}

.research-more h2 {
  max-width: 100%;
  font-family: var(--display);
  font-size: clamp(3.6rem, 6vw, 6.5rem);
  letter-spacing: -0.085em;
  line-height: 0.82;
}

.research-more h2 span,
.research-more h2 em {
  display: block;
  white-space: nowrap;
}

.research-more h2 em {
  color: var(--impact);
  font-style: italic;
}

.research-more header p {
  max-width: 34rem;
  font-size: clamp(1.25rem, 1.9vw, 1.8rem);
  font-weight: 700;
  line-height: 1.35;
}

.research-more__grid {
  width: min(100%, 92rem);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2.5rem, 5vw, 5rem) clamp(1.5rem, 3vw, 3rem);
  margin: 0 auto;
}

.research-more__grid > a {
  display: grid;
  grid-template-rows: auto 1fr;
  border-top: 2px solid #fff;
  color: inherit;
  text-decoration: none;
}

.research-more__grid figure {
  aspect-ratio: 16 / 9;
  margin: 0;
  overflow: hidden;
  border-bottom: 2px solid #fff;
  background: #fff;
}

.research-more__grid img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: grayscale(1) contrast(1.12) brightness(0.78);
  transition: filter 180ms ease, transform 260ms ease;
}

.research-more__grid h3 {
  max-width: 18ch;
  padding: 1.35rem 0 0;
  font-size: clamp(1.8rem, 3vw, 3.4rem);
  letter-spacing: -0.06em;
  line-height: 0.94;
}

.research-more__grid > a:hover img,
.research-more__grid > a:focus-visible img {
  filter: grayscale(0) contrast(1.08);
  transform: scale(1.025);
}

.research-more__grid > a:hover h3,
.research-more__grid > a:focus-visible h3 {
  color: var(--impact);
}

.research-footer {
  display: flex;
  min-height: 36svh;
  align-items: flex-end;
  padding: 4rem var(--gutter);
  border-top: 2px solid var(--ink);
  background: var(--ink);
  color: #fff;
}

.research-footer a {
  width: 100%;
  padding-top: 1.2rem;
  border-top: 2px solid #fff;
  font-family: var(--display);
  font-size: clamp(2rem, 4.5vw, 5rem);
  letter-spacing: -0.06em;
  text-decoration: none;
}

@media (max-width: 70rem) and (min-width: 56rem) {
  .research-pane h2 { font-size: clamp(1.35rem, 2vw, 2.1rem); }
  .research-pane p { font-size: 0.95rem; }
  .research-pane--sim { width: 34vw; }
  .research-pane--open { width: 30vw; }
  .research-pane--reason { width: 28vw; }
}

@media (max-width: 55.999rem) {
  :root { --header-h: 7.4rem; }

  .research-header { height: var(--header-h); grid-template-columns: 1fr auto; }
  .research-section { justify-self: end; }
  .research-nav {
    grid-column: 1 / -1;
    justify-self: stretch;
    justify-content: space-between;
    padding-top: 0.55rem;
    border-top: 1px solid var(--line);
  }

  .research-hero { min-height: 86svh; padding-top: calc(var(--header-h) + 3rem); }
  .research-hero h1 { height: 56svh; font-size: clamp(3.2rem, 15vw, 7rem); }
  .research-hero__machines { top: 26%; left: 7%; }
  .research-hero__learning { right: 0; }
  .research-hero__sheet { top: 23%; right: -14%; width: 52vw; height: 38%; opacity: 0.72; }

  .research-field { height: auto; padding: 3rem var(--gutter) 1rem; }
  .research-stage { position: relative; height: auto; overflow: visible; padding: 0; background: #fff; }
  .research-wiring { display: none; }

  .research-pane,
  .research-pane--human {
    position: relative;
    inset: auto;
    width: min(100%, 42rem);
    height: 28rem;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    margin: 0 auto 2.4rem;
    transform: none !important;
  }

  .research-pane--human h2,
  .research-pane--human figure,
  .research-pane--human p { grid-row: auto; grid-column: auto; border-right: 0; }
  .research-pane.research-pane--human h2 {
    border-bottom: 2px solid var(--ink);
    font-size: clamp(1.35rem, 4vw, 2.1rem);
  }

  .research-more > header {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 38rem) {
  .research-nav { gap: 0.75rem; overflow-x: auto; font-size: 0.88rem; white-space: nowrap; }
  .research-hero { min-height: 80svh; padding-right: 1rem; padding-left: 1rem; }
  .research-hero h1 { height: 51svh; font-size: clamp(3rem, 15.6vw, 4.15rem); }
  .research-hero__machines { left: 0; }
  .research-hero__learning { right: auto; left: 0; font-size: 0.48em; }
  .research-hero__sheet { right: -28%; }
  .research-field { padding-right: 1rem; padding-left: 1rem; }
  .research-pane { height: 24rem; }
  .research-pane h2 { font-size: 1.45rem; }
  .research-more { padding: 5rem 1rem; }
  .research-more__grid { grid-template-columns: 1fr; }
  .research-more h2 { font-size: clamp(2.65rem, 13vw, 4.4rem); }
  .research-footer { min-height: 30svh; }
}

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