/* Robot showroom and research archive */
.main-nav { gap: clamp(12px, 1.55vw, 26px); }
.page-robots .page-hero, .page-archive .page-hero {
  padding-block: clamp(48px, 5vw, 76px);
}
.page-robots .page-hero h1, .page-archive .page-hero h1 {
  font-size: clamp(2.65rem, 5.35vw, 4.95rem);
}
.robot-showroom { padding-top: clamp(32px, 4vw, 56px); }
.showroom-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 24px;
}
.showroom-heading .eyebrow, .showroom-heading h2 { margin-bottom: 0; }
.showroom-heading h2 { font-size: clamp(1.9rem, 3vw, 2.8rem); margin-top: 6px; }
.showroom-heading .model-tabs {
  padding: 5px;
  gap: 3px;
  margin: 0;
  background: #edf3fd;
  border: 1px solid #dce6f7;
  border-radius: 13px;
}
.showroom-heading .model-tabs button { border: 0; background: transparent; }
.showroom-heading .model-tabs button[aria-pressed="true"] { color: #fff; background: var(--lime); }
.robot-showroom .robot-layout {
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .85fr);
  gap: 18px;
}
.showroom-stage { background: #f4f8fd; }
.showroom-stage .model-viewport {
  height: clamp(380px, 39vw, 620px);
  background:
    radial-gradient(ellipse at 54% 41%, #fff 3%, #ebf3ff 56%, #dfeaf9 100%);
}
.showroom-stage .model-viewport::before {
  background-size: 35px 35px;
  opacity: .36;
  mask-image: radial-gradient(ellipse, transparent 9%, #000 88%);
}
.showroom-stage .model-viewport::after { content: none; }
.showroom-stage .model-label {
  top: 17px;
  left: 21px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #dce5f2;
  background: #ffffffed;
  font-size: .82rem;
  pointer-events: none;
}
.webgl-robot { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.webgl-robot canvas { width: 100%; height: 100%; display: block; pointer-events: auto; cursor: grab; }
.webgl-robot canvas:active { cursor: grabbing; }
.viewer-fallback[hidden], .showroom-buttons button[hidden] { display: none; }
.showroom-toolbar {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.showroom-toolbar p { margin: 0; font-size: .84rem; color: var(--muted); }
.showroom-buttons { display: flex; flex-wrap: wrap; gap: 7px; }
.showroom-buttons button, .showroom-buttons select, .dialog-close, .dialog-nav button {
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid #d5e0ee;
  border-radius: 8px;
  background: #fff;
  color: #273d5b;
  font-size: .875rem;
  font-weight: 650;
  cursor: pointer;
}
.showroom-buttons button:hover, .showroom-buttons button[aria-pressed="true"] {
  background: #eaf2ff;
  border-color: #a9c5f2;
  color: #154ab3;
}
.robot-showroom .robot-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 3.6vw, 52px);
  background: #f9fbff;
}
.robot-info #robot-function { margin-bottom: 9px; color: var(--lime); font-weight: 650; }
.robot-info #robot-title { font-size: clamp(1.45rem, 2.5vw, 2.28rem); text-wrap: pretty; }
.robot-parts { margin: 8px 0 20px; }
.robot-parts > div { padding-block: 13px; border-bottom: 1px solid #dbe5f2; }
.robot-parts dt { font-weight: 690; color: var(--ink); }
.robot-parts dd { margin: 4px 0 0; color: var(--muted); font-size: .91rem; line-height: 1.65; }
.robot-info .viewer-note { margin: 0; color: #536781; font-size: .83rem; }

.photo-grid, .award-grid, .archive-feature {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.media-tile {
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: start;
  padding: 0;
  appearance: none;
  cursor: zoom-in;
  overflow: hidden;
  text-align: left;
  background: #fff;
  border: 1px solid #dbe5f2;
  border-radius: 15px;
  transition: border-color .22s, box-shadow .22s, transform .3s var(--ease);
}
.media-tile:hover { transform: translateY(-4px); border-color: #a8bfe9; box-shadow: 0 14px 40px #173f8214; }
.media-image {
  position: relative;
  display: block;
  min-width: 0;
  aspect-ratio: 1.55;
  overflow: hidden;
  background: #edf3fb;
}
.media-image img { width: 100%; height: 100%; display: block; object-fit: cover; }
.media-enlarge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 8px #182c5425;
  color: #2058ba;
  font-size: 1.12rem;
}
.media-copy { display: grid; align-content: start; gap: 6px; padding: 20px 22px 23px; }
.media-copy .eyebrow { margin: 0; letter-spacing: .04em; font-size: .79rem; }
.media-copy strong { font-size: 1.15rem; line-height: 1.45; }
.media-detail { color: var(--muted); font-size: .9rem; line-height: 1.7; overflow-wrap: anywhere; }
.award-tile .media-image { padding: 17px; background: #f1f5fc; }
.award-tile .media-image img { object-fit: contain; filter: drop-shadow(0 4px 8px #1e395421); }
.archive-feature { align-items: stretch; }
.archive-feature-intro {
  padding: clamp(25px, 3.1vw, 42px);
  border-radius: 15px;
  background: #edf4ff;
}
.archive-feature-intro h2 { font-size: clamp(1.65rem, 3vw, 2.55rem); }
.archive-feature-intro p:not(.eyebrow) { color: var(--muted); line-height: 1.75; }
.archive-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; }
.archive-footer h2 { margin: 0; }

.archive-overlay-active { overflow: hidden; }
.archive-dialog {
  padding: 0;
  width: min(940px, calc(100vw - 36px));
  max-height: calc(100dvh - 32px);
  border: 1px solid #dbe5f2;
  border-radius: 19px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 23px 85px #10203f45;
}
.archive-dialog::backdrop { background: #0920419c; backdrop-filter: blur(6px); }
.archive-dialog[open] { animation: lift-in .22s var(--ease) forwards; }
.archive-dialog-bar, .archive-dialog-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 18px;
}
.dialog-counter { color: #3b577d; font-size: .9rem; font-weight: 650; }
.dialog-close, .dialog-nav button { width: 40px; height: 40px; padding: 0; font-size: 1.4rem; }
.dialog-nav { display: flex; gap: 6px; }
.archive-dialog-picture { background: #edf2f9; padding: 10px 16px; }
.archive-dialog-picture img { max-width: 100%; max-height: calc(100dvh - 220px); display: block; margin: auto; object-fit: contain; }
.archive-dialog-caption h3 { margin: 0 0 4px; }
.archive-dialog-caption p { margin: 0; font-size: .91rem; color: var(--muted); }

.project-explainer { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
.project-explainer h2 { max-width: 13em; }
.project-explainer p:not(.eyebrow) { color: var(--muted); max-width: 37em; }
.project-brief { margin: 0; padding: 12px 20px; border: 1px solid #dce5f2; border-radius: 15px; background: #f7faff; }
.project-brief > div { display: grid; grid-template-columns: minmax(95px, .35fr) 1fr; gap: 14px; padding: 14px 0; }
.project-brief > div + div { border-top: 1px solid #dce5f2; }
.project-brief dt { color: #184caa; font-weight: 680; }
.project-brief dd { margin: 0; color: var(--muted); }

@media (max-width: 970px) {
  .main-nav { gap: 11px; }
  .main-nav > a { font-size: .8125rem; }
  .robot-showroom .robot-layout { grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr); }
  .photo-grid, .award-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .archive-feature { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .archive-feature-intro { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .robot-showroom .robot-layout, .project-explainer { grid-template-columns: 1fr; gap: 19px; }
  .showroom-stage .model-viewport { height: clamp(330px, 69vw, 480px); }
  .showroom-heading .model-tabs { width: 100%; }
  .showroom-heading .model-tabs button { flex: 1; min-width: max-content; }
  .showroom-toolbar { justify-content: center; }
  .showroom-buttons { justify-content: center; }
  .media-copy { padding: 15px; }
  .media-copy strong { font-size: 1.02rem; }
}
@media (max-width: 485px) {
  .photo-grid, .award-grid, .archive-feature { grid-template-columns: 1fr; }
  .archive-dialog-caption { align-items: start; }
  .showroom-heading .model-tabs button { padding-inline: 7px; font-size: .81rem; }
}
@media (prefers-reduced-motion: reduce) {
  .archive-dialog[open] { animation: none; }
}
