:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.9);
  --ink: #0a1512;
  --muted: #57625d;
  --line: #e2e8e3;
  --line-strong: #b9c6be;
  --green: #0d6b54;
  --green-deep: #084637;
  --cobalt: #2457cc;
  --cobalt-soft: rgba(36, 87, 204, 0.07);
  --amber: #b97819;
  --amber-soft: #fff3dc;
  --canvas: #f7f9f7;
  --accent-line: rgba(13, 107, 84, 0.45);
  --radius: 8px;
  --radius-sm: 5px;
  --max: 1200px;
  --gutter: 44px;
  --mono:
    ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono",
    monospace;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0f12;
  --surface: #14171b;
  --header-bg: rgba(13, 15, 18, 0.85);
  --ink: #e9ebed;
  --muted: #969ca4;
  --line: #23272d;
  --line-strong: #474e57;
  --green: #3aae85;
  --green-deep: #135c47;
  --cobalt: #7fa3f9;
  --cobalt-soft: rgba(127, 163, 249, 0.14);
  --amber: #dda04c;
  --amber-soft: rgba(221, 160, 76, 0.13);
  --canvas: #171a1f;
  --accent-line: rgba(58, 174, 133, 0.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d0f12;
    --surface: #14171b;
    --header-bg: rgba(13, 15, 18, 0.85);
    --ink: #e9ebed;
    --muted: #969ca4;
    --line: #23272d;
    --line-strong: #474e57;
    --green: #3aae85;
    --green-deep: #135c47;
    --cobalt: #7fa3f9;
    --cobalt-soft: rgba(127, 163, 249, 0.14);
    --amber: #dda04c;
    --amber-soft: rgba(221, 160, 76, 0.13);
    --canvas: #171a1f;
    --accent-line: rgba(58, 174, 133, 0.45);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(36, 87, 204, 0.4);
  outline-offset: 4px;
}

.mono {
  font-family: var(--mono);
}

.skip-link {
  position: fixed;
  left: 20px;
  top: 12px;
  z-index: 20;
  transform: translateY(-160%);
  background: var(--ink);
  color: var(--bg);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
}

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

/* ============================== header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--max), calc(100% - var(--gutter)));
  margin: 0 auto;
  padding: 18px 0;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
}

.site-header.is-elevated {
  border-color: var(--line);
}

.brand,
.site-nav,
.site-footer nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 11px;
  font-size: 0.95rem;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: white;
  background: var(--green-deep);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.site-nav,
.site-footer nav {
  gap: 26px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  min-width: 0;
}

.site-nav a {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  transition: color 160ms ease;
}

.site-nav a span {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--green);
}

.site-nav a:hover,
.site-nav a.is-current,
.site-footer a:hover {
  color: var(--ink);
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  transform: rotate(15deg);
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
}

.theme-toggle .icon-sun circle {
  fill: currentColor;
}

.theme-toggle .rays line {
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.theme-toggle .icon-moon {
  fill: currentColor;
}

.theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun {
    display: block;
  }

  :root:not([data-theme="light"]) .theme-toggle .icon-moon {
    display: none;
  }
}

.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

html.theme-anim body,
html.theme-anim .site-header,
html.theme-anim .board,
html.theme-anim .utility-card,
html.theme-anim .module,
html.theme-anim .hero-figure {
  transition: background-color 320ms ease, border-color 320ms ease, color 320ms ease;
}

/* ============================== hero */

.hero {
  width: min(var(--max), calc(100% - var(--gutter)));
  margin: 0 auto;
  padding: 60px 0 0;
}

.hero-meta {
  margin: 0 0 30px;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(4rem, 12.2vw, 10.4rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.hero h1 .line {
  display: block;
}

.hero h1 .line-2 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 28px;
}

.hero h1 .outline {
  /* stroke under a bg-colored fill: interior contour-overlap edges stay hidden */
  color: var(--bg);
  -webkit-text-stroke: 0.026em var(--ink);
  paint-order: stroke fill;
  letter-spacing: -0.012em;
}

@supports not (-webkit-text-stroke: 1px black) {
  .hero h1 .outline {
    color: var(--ink);
  }
}

.hero-annot {
  flex: none;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: right;
  line-height: 1.8;
  transform: translateY(-0.4em);
}

.hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 36px;
  margin-top: 44px;
}

.hero-lede {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.15rem, 1.9vw, 1.5rem);
  line-height: 1.36;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 700;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--green-deep);
  border-color: var(--green-deep);
  color: white;
}

.button.secondary {
  background: var(--surface);
}

.button.secondary:hover {
  border-color: var(--green-deep);
}

.hero-figure {
  margin: 56px 0 0;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 20px;
}

.schematic-tall {
  display: none;
}

.hero-index {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 0;
  justify-content: space-between;
  margin: 64px 0 0;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.hero-index span {
  padding-right: 20px;
}

.hero-index span:last-child {
  padding-right: 0;
}

/* ============================== svg figure language */

.figure-svg,
.schematic {
  width: 100%;
  height: auto;
}

.schematic .dot {
  fill: var(--line);
}

.node rect {
  fill: var(--surface);
  stroke: var(--line-strong);
  stroke-width: 1.4;
  rx: 5;
  transition: stroke 180ms ease;
}

.node:hover rect {
  stroke: var(--green);
}

.node-core rect {
  fill: var(--green-deep);
  stroke: var(--green-deep);
}

.node-amber rect {
  stroke: var(--amber);
}

.t-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  fill: var(--muted);
}

.t-name {
  font-family: inherit;
  font-size: 15px;
  font-weight: 650;
  fill: var(--ink);
}

.node-core .t-label {
  fill: rgba(255, 255, 255, 0.72);
}

.node-core .t-name {
  fill: #ffffff;
}

.node-amber .t-label {
  fill: var(--amber);
}

.t-note {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.13em;
  fill: var(--line-strong);
}

.t-mono-right {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  fill: var(--muted);
  text-anchor: end;
}

.wire {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1.5;
}

.wire-active {
  stroke: var(--cobalt);
}

.t-note-right {
  fill: var(--line-strong);
}

/* hero exploded section view */
.slab-top {
  fill: var(--surface);
  stroke: var(--line-strong);
  stroke-width: 1.4;
  stroke-linejoin: round;
}

.slab-side {
  fill: var(--canvas);
  stroke: var(--line-strong);
  stroke-width: 1.2;
  stroke-linejoin: round;
}

.tile {
  fill: var(--surface);
  stroke: var(--line-strong);
  stroke-width: 1.3;
  stroke-linejoin: round;
}

.tile-green,
.tile-core {
  fill: var(--green-deep);
  stroke: var(--green-deep);
}

.tile-amber {
  fill: var(--amber-soft);
  stroke: var(--amber);
}

.slab-detail {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1;
  opacity: 0.75;
}

.axis-line {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1.3;
  stroke-dasharray: 3 7;
  stroke-linecap: round;
}

.leader {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1.2;
}

.dotmark {
  fill: var(--line-strong);
}

.t-end {
  text-anchor: end;
}

.schematic-tall .t-label {
  font-size: 13px;
}

.schematic-tall .t-name {
  font-size: 18px;
}

.arrow-head {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1.4;
}

.axis {
  stroke: var(--ink);
  stroke-opacity: 0.24;
  stroke-width: 1.4;
}

.hairline {
  stroke: var(--line);
  stroke-width: 1;
}

/* fitness */
.ring-track {
  fill: none;
  stroke: var(--line);
  stroke-width: 11;
}

.ring {
  fill: none;
  stroke-width: 11;
  stroke-linecap: round;
}

.ring-green {
  stroke: var(--green);
}

.ring-cobalt {
  stroke: var(--cobalt);
}

.ring-amber {
  stroke: var(--amber);
}

.bars rect,
.wave rect {
  fill: var(--green-deep);
}

.bar-accent {
  fill: var(--amber) !important;
}

/* calendar */
.day-dot {
  fill: var(--line-strong);
}

.day-dot-active {
  fill: var(--green);
}

.day-dot-amber {
  fill: var(--amber);
}

/* gebeta */
.pits > circle {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1.6;
}

.pits .pit-active {
  stroke: var(--green);
  stroke-width: 2.4;
}

.seeds circle {
  fill: var(--green-deep);
  stroke: none;
}

/* presswork */
.bar-track {
  fill: var(--canvas);
  stroke: var(--line);
  stroke-width: 1;
}

.bar-fill {
  fill: var(--green-deep);
}

/* plate */
.plate-frame {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 1.4;
  rx: 6;
}

.cavity-row circle {
  fill: var(--surface);
  stroke: var(--accent-line);
  stroke-width: 2;
}

.cavity-missing {
  fill: var(--amber-soft) !important;
  stroke: var(--amber) !important;
}

.cavity-warn {
  fill: var(--cobalt-soft) !important;
  stroke: var(--cobalt) !important;
}

.bracket path {
  fill: none;
  stroke: var(--amber);
  stroke-width: 2;
}

.t-flag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-anchor: middle;
}

.t-flag-amber {
  fill: var(--amber);
}

.t-flag-cobalt {
  fill: var(--cobalt);
}

/* ============================== sections */

.section {
  width: min(var(--max), calc(100% - var(--gutter)));
  margin: 0 auto;
  padding: 104px 0 0;
}

.section:last-of-type {
  padding-bottom: 110px;
}

.section-rule {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--ink);
  margin-bottom: 56px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.section h2 {
  margin: 0;
  font-size: clamp(2.5rem, 4.8vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.section-lede,
.section-heading p,
.project-copy p,
.lead-copy p,
.utility-copy p,
.subhead p {
  color: var(--muted);
  line-height: 1.58;
}

.section-lede {
  margin: 24px 0 0;
  font-size: clamp(1.12rem, 1.9vw, 1.36rem);
  max-width: 720px;
}

/* lead */

.lead-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.86fr) minmax(420px, 1.14fr);
  gap: 64px;
  align-items: start;
}

.lead-copy p:not(.section-lede) {
  margin: 22px 0 0;
  font-size: 1rem;
}

.work-facts,
.project-points {
  display: grid;
  gap: 10px;
  margin: 28px 0 0;
}

.work-facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.work-facts div,
.project-points div {
  border-left: 2px solid var(--accent-line);
  padding: 4px 0 4px 14px;
}

.work-facts dt,
.project-points dt {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.work-facts dd,
.project-points dd {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.stack-list li {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: border-color 180ms ease;
}

.stack-list li:hover {
  border-color: var(--accent-line);
}

.stack-list.compact {
  margin-top: 22px;
}

/* boards / figures */

.board {
  margin: 0;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 24px;
  transition: border-color 200ms ease;
}

.board:hover {
  border-color: var(--line-strong);
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.module {
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 14px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: transform 200ms ease, border-color 200ms ease;
}

.module:hover {
  transform: translateY(-2px);
  border-color: var(--green);
}

.module .mono {
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
}

.module b {
  font-size: 0.95rem;
}

.module.is-active {
  background: var(--green-deep);
  border-color: var(--green-deep);
  color: white;
}

.module.is-active .mono {
  color: rgba(255, 255, 255, 0.72);
}

.arch-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 26px;
}

.arch-strip span,
.arch-strip b {
  display: grid;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
}

.arch-strip b {
  background: var(--green-deep);
  border-color: var(--green-deep);
  color: white;
}

.fig-caption {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--line-strong);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

/* systems */

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(260px, 0.46fr);
  gap: 44px;
  align-items: end;
  margin-bottom: 24px;
}

.section-heading p {
  margin: 0;
  font-size: 0.98rem;
}

.project-row {
  display: grid;
  grid-template-columns: minmax(280px, 0.46fr) minmax(380px, 0.54fr);
  gap: 64px;
  align-items: center;
  padding: 72px 0;
  border-top: 1px solid var(--line);
}

.project-row.flip .project-copy {
  order: 2;
}

.project-row h3 {
  margin: 0;
  font-size: clamp(1.9rem, 3.2vw, 3.1rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  font-weight: 800;
}

.project-scope {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.project-copy p:not(.project-scope) {
  margin: 20px 0 0;
  font-size: 1rem;
}

.project-points {
  margin-top: 24px;
}

/* utilities */

.subhead {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(260px, 0.46fr);
  gap: 44px;
  align-items: end;
  padding: 64px 0 36px;
  border-top: 1px solid var(--line);
}

.subhead h3 {
  margin: 0;
  font-size: clamp(1.6rem, 2.6vw, 2.3rem);
  letter-spacing: -0.01em;
  font-weight: 800;
}

.subhead p {
  margin: 0;
  font-size: 0.98rem;
}

.utility-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding-bottom: 8px;
}

.utility-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease;
}

.utility-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}

.utility-figure {
  margin: 0;
  padding: 18px 18px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.utility-copy {
  padding: 22px 26px 28px;
}

.utility-copy h4 {
  margin: 0;
  font-size: 1.42rem;
  letter-spacing: -0.01em;
  font-weight: 800;
}

.utility-copy p:not(.project-scope) {
  margin: 12px 0 0;
  font-size: 0.95rem;
}

.utility-copy .project-scope {
  margin-bottom: 10px;
}

/* research */

.research-copy {
  max-width: 860px;
}

.research-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.88fr) minmax(380px, 1.12fr);
  gap: 64px;
  align-items: start;
  margin-top: 60px;
}

.pipeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pipeline li {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 18px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.pipeline li:last-child {
  border-bottom: 1px solid var(--line);
}

.pipeline .mono {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 600;
  padding-top: 3px;
}

.pipeline b {
  font-size: 1.02rem;
}

.pipeline p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.93rem;
}

.evidence-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin: 64px 0 0;
  padding: 0;
  list-style: none;
}

.evidence-list li {
  padding-top: 14px;
  border-top: 1px solid var(--line-strong);
  font-size: 0.92rem;
  font-weight: 650;
}

.evidence-list .mono {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

/* footer */

.site-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  width: min(var(--max), calc(100% - var(--gutter)));
  margin: 0 auto;
  padding: 36px 0 48px;
  border-top: 1px solid var(--ink);
  color: var(--muted);
}

.footer-name {
  color: var(--ink);
  font-weight: 700;
}

.colophon {
  margin: 10px 0 0;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ============================== motion
   Pre-reveal hidden states live under html.js-anim, which main.js adds
   only when IntersectionObserver exists and reduced motion is off —
   without JS the page is fully visible and static. */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

.hero-meta,
.hero h1 .line,
.hero-row {
  animation: rise 640ms cubic-bezier(0.2, 0.6, 0.2, 1) both;
}

.hero h1 .line {
  animation-delay: 70ms;
}

.hero h1 .line-2 {
  animation-delay: 150ms;
}

.hero-row {
  animation-delay: 240ms;
}

.js-anim [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 640ms cubic-bezier(0.2, 0.6, 0.2, 1),
    transform 640ms cubic-bezier(0.2, 0.6, 0.2, 1);
}

.js-anim [data-reveal].in-view {
  opacity: 1;
  transform: none;
}

.js-anim .utility-card:nth-of-type(even)[data-reveal] {
  transition-delay: 110ms;
}

/* hero stack explodes apart along its assembly axis, then hovers */
.schematic-wide .unit-1 { --dy: 150px; }
.schematic-wide .unit-2 { --dy: 50px; }
.schematic-wide .unit-3 { --dy: -50px; }
.schematic-wide .unit-4 { --dy: -150px; }
.schematic-tall .unit-1 { --dy: 172px; }
.schematic-tall .unit-2 { --dy: 57px; }
.schematic-tall .unit-3 { --dy: -58px; }
.schematic-tall .unit-4 { --dy: -173px; }

.js-anim [data-reveal] .unit {
  opacity: 0;
  transform: translateY(var(--dy, 0px));
  transition:
    transform 900ms cubic-bezier(0.2, 0.6, 0.2, 1),
    opacity 500ms ease;
}

.js-anim [data-reveal] .unit-4 { transition-delay: 0ms; }
.js-anim [data-reveal] .unit-3 { transition-delay: 80ms; }
.js-anim [data-reveal] .unit-2 { transition-delay: 160ms; }
.js-anim [data-reveal] .unit-1 { transition-delay: 240ms; }

.js-anim [data-reveal].in-view .unit {
  opacity: 1;
  transform: none;
}

.js-anim [data-reveal] .axis-line {
  opacity: 0;
  transition: opacity 600ms ease 480ms;
}

.js-anim [data-reveal].in-view .axis-line {
  opacity: 1;
}

.js-anim [data-reveal] .leader {
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 500ms cubic-bezier(0.4, 0, 0.2, 1) 680ms;
}

.js-anim [data-reveal].in-view .leader {
  stroke-dashoffset: 0;
}

.js-anim [data-reveal] .fig-label {
  opacity: 0;
  transition: opacity 500ms ease 840ms;
}

.js-anim [data-reveal].in-view .fig-label {
  opacity: 1;
}

@keyframes hover-drift {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

.js-anim [data-reveal].in-view .unit-float {
  animation: hover-drift 9s ease-in-out 1.6s infinite;
}

.js-anim [data-reveal].in-view .unit-2 .unit-float {
  animation-duration: 10.5s;
  animation-delay: 2.1s;
}

.js-anim [data-reveal].in-view .unit-3 .unit-float {
  animation-duration: 12s;
  animation-delay: 1.8s;
}

.js-anim [data-reveal].in-view .unit-4 .unit-float {
  animation-duration: 13.5s;
  animation-delay: 2.4s;
}

/* wires draw themselves in */
.js-anim [data-reveal] .wire {
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 900ms cubic-bezier(0.4, 0, 0.2, 1) 280ms;
}

.js-anim [data-reveal].in-view .wire {
  stroke-dashoffset: 0;
}

/* rings sweep */
.js-anim [data-reveal] .ring {
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1100ms cubic-bezier(0.4, 0, 0.2, 1) 300ms;
}

.js-anim [data-reveal] .ring-cobalt {
  transition-delay: 460ms;
}

.js-anim [data-reveal] .ring-amber {
  transition-delay: 620ms;
}

.js-anim [data-reveal].in-view .ring {
  stroke-dashoffset: 0;
}

/* bars grow */
.js-anim [data-reveal] .bars rect {
  transform: scaleY(0);
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transition: transform 620ms cubic-bezier(0.2, 0.6, 0.2, 1) 260ms;
}

.js-anim [data-reveal] .bars rect:nth-child(2) { transition-delay: 320ms; }
.js-anim [data-reveal] .bars rect:nth-child(3) { transition-delay: 380ms; }
.js-anim [data-reveal] .bars rect:nth-child(4) { transition-delay: 440ms; }
.js-anim [data-reveal] .bars rect:nth-child(5) { transition-delay: 500ms; }
.js-anim [data-reveal] .bars rect:nth-child(6) { transition-delay: 560ms; }
.js-anim [data-reveal] .bars rect:nth-child(7) { transition-delay: 620ms; }

.js-anim [data-reveal].in-view .bars rect {
  transform: none;
}

/* waveform pops from its centerline */
.js-anim [data-reveal] .wave rect {
  transform: scaleY(0);
  transform-box: fill-box;
  transform-origin: 50% 50%;
  transition: transform 520ms cubic-bezier(0.2, 0.6, 0.2, 1) 240ms;
}

.js-anim [data-reveal] .wave rect:nth-child(even) {
  transition-delay: 340ms;
}

.js-anim [data-reveal].in-view .wave rect {
  transform: none;
}

/* presswork bars compress from the left */
.js-anim [data-reveal] .press .bar-fill {
  transform: scaleX(0);
  transform-box: fill-box;
  transform-origin: 0% 50%;
  transition: transform 640ms cubic-bezier(0.2, 0.6, 0.2, 1) 280ms;
}

.js-anim [data-reveal] .press rect:nth-of-type(4) { transition-delay: 380ms; }
.js-anim [data-reveal] .press rect:nth-of-type(6) { transition-delay: 480ms; }
.js-anim [data-reveal] .press rect:nth-of-type(8) { transition-delay: 580ms; }

.js-anim [data-reveal].in-view .press .bar-fill {
  transform: none;
}

/* calendar months cascade */
.js-anim [data-reveal] .months rect {
  opacity: 0;
  transition: opacity 420ms ease 240ms;
}

.js-anim [data-reveal] .months rect:nth-child(2)  { transition-delay: 280ms; }
.js-anim [data-reveal] .months rect:nth-child(3)  { transition-delay: 320ms; }
.js-anim [data-reveal] .months rect:nth-child(4)  { transition-delay: 360ms; }
.js-anim [data-reveal] .months rect:nth-child(5)  { transition-delay: 400ms; }
.js-anim [data-reveal] .months rect:nth-child(6)  { transition-delay: 440ms; }
.js-anim [data-reveal] .months rect:nth-child(7)  { transition-delay: 480ms; }
.js-anim [data-reveal] .months rect:nth-child(8)  { transition-delay: 520ms; }
.js-anim [data-reveal] .months rect:nth-child(9)  { transition-delay: 560ms; }
.js-anim [data-reveal] .months rect:nth-child(10) { transition-delay: 600ms; }
.js-anim [data-reveal] .months rect:nth-child(11) { transition-delay: 640ms; }
.js-anim [data-reveal] .months rect:nth-child(12) { transition-delay: 680ms; }
.js-anim [data-reveal] .months rect:nth-child(13) { transition-delay: 720ms; }

.js-anim [data-reveal].in-view .months rect {
  opacity: 1;
}

/* gebeta seeds drop in */
.js-anim [data-reveal] .seeds circle {
  transform: scale(0);
  transform-box: fill-box;
  transform-origin: 50% 50%;
  transition: transform 380ms cubic-bezier(0.34, 1.4, 0.4, 1) 300ms;
}

.js-anim [data-reveal] .seeds circle:nth-child(even) {
  transition-delay: 420ms;
}

.js-anim [data-reveal] .seeds circle:nth-child(3n) {
  transition-delay: 540ms;
}

.js-anim [data-reveal].in-view .seeds circle {
  transform: none;
}

/* plate brackets trace, flags fade in late */
.js-anim [data-reveal] .bracket path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  transition: stroke-dashoffset 500ms ease 600ms;
}

.js-anim [data-reveal].in-view .bracket path {
  stroke-dashoffset: 0;
}

.js-anim [data-reveal] .t-flag {
  opacity: 0;
  transition: opacity 400ms ease 850ms;
}

.js-anim [data-reveal].in-view .t-flag {
  opacity: 1;
}

/* ============================== responsive */

@media (max-width: 1020px) {
  .lead-grid,
  .section-heading,
  .subhead,
  .project-row,
  .research-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 48px;
  }

  .project-row {
    gap: 36px;
    padding: 56px 0;
  }

  .project-row.flip .project-copy {
    order: 0;
  }

  .section-heading,
  .subhead {
    gap: 16px;
  }

  .research-grid {
    gap: 36px;
  }

  .evidence-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  :root {
    --gutter: 32px;
  }

  .brand-name {
    display: none;
  }

  .site-nav {
    gap: 16px;
    font-size: 0.84rem;
  }

  .hero {
    padding-top: 40px;
  }

  .hero h1 {
    font-size: clamp(3.1rem, 15.5vw, 4.6rem);
  }

  .hero-annot {
    display: none;
  }

  .hero-row {
    grid-template-columns: 1fr;
    gap: 26px;
    margin-top: 30px;
  }

  .hero-figure {
    margin-top: 40px;
    padding: 14px;
  }

  .schematic-wide {
    display: none;
  }

  .schematic-tall {
    display: block;
  }

  .hero-index {
    margin-top: 48px;
    gap: 10px 18px;
    justify-content: flex-start;
  }

  .hero-index span {
    padding-right: 0;
  }

  .section {
    padding-top: 76px;
  }

  .section-rule {
    margin-bottom: 40px;
  }

  .work-facts {
    grid-template-columns: 1fr;
  }

  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .arch-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .utility-grid {
    grid-template-columns: 1fr;
  }

  .board {
    padding: 16px;
  }

  .evidence-list {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

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