/**
 * Shared components · v2
 * Header · drawer · buttons · lists · logo grid · duotone media · stack diagram · closing footer
 */

/* ---------- Icons (masks, inherit currentColor) ---------- */
:root {
  --icon-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8h10M8.5 3.75 12.75 8 8.5 12.25' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --icon-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.25 8.4 6.4 11.5 12.75 4.75' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --icon-dash: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8h8' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* Names without an official mark file. Site type, not an invented glyph. */
.mark-word {
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--color-ink);
  white-space: nowrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 600;
  font-size: var(--text-small);
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--duration-ui) var(--ease-out),
    color var(--duration-ui) var(--ease-out),
    border-color var(--duration-ui) var(--ease-out),
    transform var(--duration-press) var(--ease-out);
}

.btn:active {
  transform: scale(0.97);
}

.btn--arrow::after,
.text-link::after,
.link-card__go::after {
  content: "";
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: var(--icon-arrow) center / contain no-repeat;
  mask: var(--icon-arrow) center / contain no-repeat;
  transition: transform var(--duration-ui) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .btn--arrow:hover::after,
  .text-link:hover::after,
  a:hover .link-card__go::after {
    transform: translateX(3px);
  }
}

.btn--primary {
  background: var(--color-accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-accent-hover);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--color-ink);
  border-color: var(--color-line-strong);
}

.btn--ghost:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn--solid-light {
  background: #fff;
  color: var(--color-navy-900);
}

.btn--solid-light:hover {
  background: var(--color-accent-soft);
  color: var(--color-accent-hover);
}

.btn--ghost-light {
  background: transparent;
  color: var(--color-on-dark);
  border-color: rgba(226, 234, 246, 0.32);
}

.btn--ghost-light:hover {
  border-color: #fff;
  color: #fff;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-accent);
}

.text-link:hover {
  color: var(--color-accent-hover);
}

/* ---------- Header ---------- */
.site-header {
  height: var(--nav-h);
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--color-line);
  background: rgba(251, 252, 253, 0.8);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  transition: background-color var(--duration-ui) var(--ease-out),
    border-color var(--duration-ui) var(--ease-out);
}

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: auto;
}

.brand img {
  height: 32px;
  width: auto;
  max-width: 160px;
  transition: filter var(--duration-ui) var(--ease-out);
}

.nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: var(--nav-h);
  padding: 0 0.95rem;
  text-decoration: none;
  color: var(--color-ink-2);
  font-size: var(--text-small);
  font-weight: 500;
  transition: color var(--duration-ui) var(--ease-out);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0.95rem;
  right: 0.95rem;
  bottom: -1px;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-ui) var(--ease-out);
}

.nav a:hover {
  color: var(--color-accent);
}

.nav a[aria-current="page"] {
  color: var(--color-accent);
  font-weight: 600;
}

.nav a[aria-current="page"]::after,
.nav a:hover::after {
  transform: scaleX(1);
}

.header-cta {
  display: none;
  flex-shrink: 0;
  margin-left: 1rem;
  min-height: 2.5rem;
  padding: 0.55rem 1.1rem;
}

@media (min-width: 992px) {
  .nav {
    display: flex;
  }

  .header-cta {
    display: inline-flex;
  }
}

@media (min-width: 992px) and (max-width: 1120px) {
  .nav a {
    padding: 0 0.7rem;
  }

  .nav a::after {
    left: 0.7rem;
    right: 0.7rem;
  }
}

/* Dark header: over home hero, or when the dark closing block is under it */
body.has-hero:not(.header-solid) .site-header,
.site-header.site-header--on-dark {
  background: rgba(6, 17, 40, 0.72);
  border-bottom-color: var(--color-line-dark);
}

body.has-hero:not(.header-solid) .site-header .nav a,
.site-header.site-header--on-dark .nav a {
  color: rgba(226, 234, 246, 0.82);
}

body.has-hero:not(.header-solid) .site-header .nav a:hover,
.site-header.site-header--on-dark .nav a:hover {
  color: #fff;
}

body.has-hero:not(.header-solid) .site-header .brand img,
.site-header.site-header--on-dark .brand img {
  filter: brightness(0) invert(1);
}

body.has-hero:not(.header-solid) .site-header .header-cta,
.site-header.site-header--on-dark .header-cta {
  background: #fff;
  color: var(--color-navy-900);
}

body.has-hero:not(.header-solid) .site-header .nav-toggle,
.site-header.site-header--on-dark .nav-toggle {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--color-line-dark);
}

body.has-hero:not(.header-solid) .site-header .nav-toggle__bars,
body.has-hero:not(.header-solid) .site-header .nav-toggle__bars::before,
body.has-hero:not(.header-solid) .site-header .nav-toggle__bars::after,
.site-header.site-header--on-dark .nav-toggle__bars,
.site-header.site-header--on-dark .nav-toggle__bars::before,
.site-header.site-header--on-dark .nav-toggle__bars::after {
  background: #fff;
}

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: var(--color-elevated);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  body.has-hero:not(.header-solid) .site-header,
  .site-header.site-header--on-dark {
    background: var(--color-navy-950);
  }
}

/* ---------- Mobile toggle + drawer ---------- */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: var(--color-elevated);
  cursor: pointer;
  padding: 0;
  transition: transform var(--duration-press) var(--ease-out);
}

.nav-toggle:active {
  transform: scale(0.97);
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: var(--color-ink);
  border-radius: 1px;
}

.nav-toggle__bars {
  position: relative;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bars::before {
  top: -6px;
}

.nav-toggle__bars::after {
  top: 6px;
}

@media (min-width: 992px) {
  .nav-toggle {
    display: none;
  }
}

.nav-drawer {
  display: none;
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  z-index: 50;
  background: var(--color-elevated);
  padding: var(--space-5) var(--space-5) var(--space-8);
  overflow: auto;
  border-top: 1px solid var(--color-line);
}

.nav-drawer.is-open {
  display: block;
}

.nav-drawer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-drawer ul a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.05rem 0.25rem;
  border-bottom: 1px solid var(--color-line);
  text-decoration: none;
  color: var(--color-ink);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.4;
}

.nav-drawer .btn {
  width: 100%;
  margin-top: var(--space-6);
  font-size: var(--text-body);
}

body.nav-open {
  overflow: hidden;
}

/* ---------- Section head ---------- */
.section-head {
  display: grid;
  gap: var(--space-4);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-head h2 {
  margin: 0;
  max-width: 16em;
}

.section-head p:not(.eyebrow) {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--text-lead);
  line-height: 1.7;
}

@media (min-width: 900px) {
  .section-head--split {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: end;
    column-gap: var(--space-10);
  }

  .section-head--split .eyebrow {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }
}

/* ---------- Spec-sheet layout: heading 4 cols, body 8 cols ---------- */
.spec {
  display: grid;
  gap: var(--space-5);
  padding-block: var(--page-section-y);
  border-top: 1px solid var(--color-line);
}

.spec:first-child {
  border-top: 0;
}

.spec__head h2 {
  margin: 0;
  font-size: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
}

.spec__head .eyebrow {
  margin-bottom: 0.9rem;
}

.spec__head p:not(.eyebrow) {
  margin: 0.9rem 0 0;
  color: var(--color-muted);
  font-size: var(--text-small);
  line-height: var(--leading-small);
  max-width: 22rem;
}

.spec__body {
  min-width: 0;
}

.spec__body > :first-child {
  margin-top: 0;
}

.spec__body > :last-child {
  margin-bottom: 0;
}

.spec__body > p {
  color: var(--color-ink-2);
  max-width: 44rem;
}

.spec__body > * + * {
  margin-top: var(--space-5);
}

.spec__body > p + p {
  margin-top: var(--space-4);
}

@media (min-width: 900px) {
  .spec {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    column-gap: var(--space-10);
  }

  .spec__head {
    position: sticky;
    top: calc(var(--nav-h) + 2rem);
    align-self: start;
  }
}

/* ---------- Lists ---------- */
.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--color-line);
}

.check-list li {
  position: relative;
  padding: 0.95rem 0 0.95rem 2.1rem;
  border-bottom: 1px solid var(--color-line);
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--color-ink);
  min-width: 0;
  overflow-wrap: break-word;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 1.2rem;
  width: 1.1rem;
  height: 1.1rem;
  background: var(--color-accent);
  -webkit-mask: var(--icon-check) center / contain no-repeat;
  mask: var(--icon-check) center / contain no-repeat;
}

.check-list--boundary li {
  color: var(--color-muted);
}

.check-list--boundary li::before {
  background: var(--color-faint);
  -webkit-mask-image: var(--icon-dash);
  mask-image: var(--icon-dash);
}

@media (min-width: 720px) {
  .check-list--2col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--space-6);
  }
}

.num-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: num;
  display: grid;
  border-top: 1px solid var(--color-line);
}

.num-list > li {
  counter-increment: num;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 0 var(--space-4);
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--color-line);
}

.num-list > li::before {
  content: counter(num, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  color: var(--color-accent);
  padding-top: 0.3rem;
}

.num-list h3 {
  margin: 0 0 0.35rem;
  font-size: 1.125rem;
}

.num-list p {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}

.prose-note {
  margin: var(--space-4) 0 0;
  color: var(--color-muted);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}

/* Chips: product / page cross-links */
.chip-row,
.cover-links,
.related-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip-row a,
.cover-links a,
.related-row a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-pill);
  background: var(--color-elevated);
  text-decoration: none;
  color: var(--color-ink-2);
  font-size: var(--text-small);
  font-weight: 500;
  transition: border-color var(--duration-ui) var(--ease-out),
    color var(--duration-ui) var(--ease-out),
    transform var(--duration-press) var(--ease-out);
}

.chip-row a:active,
.cover-links a:active,
.related-row a:active {
  transform: scale(0.97);
}

.chip-row a:hover,
.cover-links a:hover,
.related-row a:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ---------- Link cards ---------- */
.link-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--color-line);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  overflow: hidden;
}

@media (min-width: 720px) {
  .link-cards {
    grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr));
  }

  .link-cards--3 {
    --cols: 3;
  }

  .link-cards--4 {
    --cols: 4;
  }
}

.link-cards a {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
  padding: 1.5rem 1.5rem 1.35rem;
  background: var(--color-elevated);
  color: inherit;
  text-decoration: none;
  transition: background-color var(--duration-ui) var(--ease-out);
}

.link-cards a:hover {
  background: var(--color-accent-soft);
}

.link-card__kicker {
  font-family: var(--font-mono), var(--font-sans);
  font-size: var(--text-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-faint);
}

.link-cards strong {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-ink);
}

.link-cards span:not(.link-card__kicker):not(.link-card__go) {
  color: var(--color-muted);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}

.link-card__go {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.75rem;
  color: var(--color-accent);
  font-size: var(--text-small);
  font-weight: 600;
}

/* ---------- Logo grid (customers / partners) ---------- */
.logo-grid,
.logo-wall {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--color-line);
  border-left: 1px solid var(--color-line);
}

@media (min-width: 640px) {
  .logo-grid,
  .logo-wall {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .logo-grid,
  .logo-wall {
    grid-template-columns: repeat(var(--logo-cols, 4), minmax(0, 1fr));
  }
}

.logo-grid > li,
.logo-wall > .logo-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 6.25rem;
  padding: 1.25rem 1rem;
  border-right: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
  background: var(--color-elevated);
}

.logo-grid img,
.logo-wall .logo-tile img {
  width: auto;
  height: auto;
  max-width: min(100%, 9.5rem);
  max-height: 2.1rem;
  object-fit: contain;
  filter: grayscale(1) contrast(1.05);
  opacity: 0.68;
  transition: filter var(--duration-ui) var(--ease-out),
    opacity var(--duration-ui) var(--ease-out);
}

.logo-wall .logo-tile--mark img {
  max-height: 2.75rem;
}

.logo-wall .logo-tile--wide img {
  max-height: 1.6rem;
}

@media (hover: hover) and (pointer: fine) {
  .logo-grid > li:hover img,
  .logo-wall .logo-tile:hover img {
    filter: none;
    opacity: 1;
  }
}

/* Partner marks shipped as white mono SVG: render as ink */
.logo-grid img.is-mono {
  filter: brightness(0);
  opacity: 0.62;
}

.logo-grid > li:hover img.is-mono {
  filter: brightness(0);
  opacity: 0.9;
}

/* ---------- Proof strip: hard facts in mono numerals ---------- */
.proof {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--color-line);
}

@media (min-width: 900px) {
  .proof {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.proof li {
  display: grid;
  align-content: start;
  gap: 0.4rem;
  padding: 1.5rem 1.25rem 1.5rem 0;
  border-bottom: 1px solid var(--color-line);
}

@media (min-width: 900px) {
  .proof li {
    border-bottom: 0;
    padding-left: 1.5rem;
    border-left: 1px solid var(--color-line);
  }

  .proof li:first-child {
    padding-left: 0;
    border-left: 0;
  }
}

.proof strong {
  font-family: var(--font-mono), var(--font-sans);
  font-size: clamp(2rem, 1.5rem + 1.8vw, 3rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--color-ink);
}

.proof strong small {
  margin-left: 0.15rem;
  font-family: var(--font-sans);
  font-size: 0.4em;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--color-muted);
}

.proof span {
  font-size: var(--text-small);
  line-height: var(--leading-small);
  color: var(--color-muted);
}

.proof--dark {
  border-top-color: var(--color-line-dark);
}

.proof--dark li {
  border-color: var(--color-line-dark);
}

.proof--dark strong {
  color: #fff;
}

.proof--dark strong small,
.proof--dark span {
  color: var(--color-on-dark-muted);
}

/* ---------- Duotone media: any photo becomes on-brand ---------- */
.duo {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-navy-900);
  isolation: isolate;
}

.duo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05) brightness(1.35);
}

.duo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #8fb9f5 0%, #3f7ad0 45%, #13366d 100%);
  mix-blend-mode: multiply;
  pointer-events: none;
}

.duo--night img {
  filter: grayscale(1) contrast(1.1) brightness(1.75);
}

.duo--soft img {
  filter: grayscale(1) contrast(0.95) brightness(1.2);
}

.duo--soft::after {
  background: linear-gradient(160deg, #c3d8f7 0%, #6f9ad8 50%, #25508f 100%);
}

.duo__cap {
  position: absolute;
  left: 1rem;
  bottom: 0.9rem;
  z-index: 1;
  font-family: var(--font-mono), var(--font-sans);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  color: rgba(242, 245, 250, 0.7);
}

/* Engineering illustrations retain their full linework and original palette. */
.engineering-art {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.engineering-art img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
}

/* ---------- Stack diagram: stacked plates, top = business ---------- */
.stack {
  --step: 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.stack__layer {
  position: relative;
  display: grid;
  grid-template-columns: 2.75rem minmax(5.5rem, 7.5rem) minmax(0, 1fr);
  align-items: center;
  gap: 0.25rem 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius);
  background: var(--color-elevated);
  box-shadow: 0 5px 0 -1px var(--color-surface),
    0 5px 0 0 var(--color-line-strong);
}

.stack__layer:nth-last-child(2) { margin-inline: calc(var(--step) * 1); }
.stack__layer:nth-last-child(3) { margin-inline: calc(var(--step) * 2); }
.stack__layer:nth-last-child(4) { margin-inline: calc(var(--step) * 3); }
.stack__layer:nth-last-child(5) { margin-inline: calc(var(--step) * 4); }
.stack__layer:nth-last-child(6) { margin-inline: calc(var(--step) * 5); }
.stack__layer:nth-last-child(7) { margin-inline: calc(var(--step) * 6); }
.stack__layer:nth-last-child(8) { margin-inline: calc(var(--step) * 7); }

.stack__layer--top {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 5px 0 -1px #133f7e;
}

.stack__tag {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  color: var(--color-faint);
}

.stack__name {
  font-weight: 600;
  font-size: var(--text-small);
}

.stack__nodes {
  font-size: var(--text-small);
  color: var(--color-ink-2);
  min-width: 0;
}

.stack__nodes a {
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: none;
}

.stack__nodes a:hover {
  text-decoration: underline;
}

.stack__sep {
  margin: 0 0.4rem;
  color: var(--color-faint);
}

.stack__blurb {
  grid-column: 3;
  margin: 0;
  font-size: var(--text-caption);
  line-height: 1.55;
  color: var(--color-muted);
}

.stack__layer--top .stack__tag,
.stack__layer--top .stack__nodes,
.stack__layer--top .stack__blurb {
  color: rgba(255, 255, 255, 0.82);
}

.stack__cap {
  margin: var(--space-5) 0 0;
  font-size: var(--text-caption);
  color: var(--color-muted);
}

@media (prefers-reduced-motion: no-preference) {
  html.is-motion .reveal.is-reveal-ready .stack__layer {
    opacity: 0;
    transform: translateY(12px);
  }

  html.is-motion .reveal.is-in .stack__layer {
    opacity: 1;
    transform: none;
    transition: opacity var(--duration-reveal) var(--ease-out),
      transform var(--duration-reveal) var(--ease-out);
  }

  html.is-motion .reveal.is-in .stack__layer:nth-child(2) { transition-delay: 70ms; }
  html.is-motion .reveal.is-in .stack__layer:nth-child(3) { transition-delay: 140ms; }
  html.is-motion .reveal.is-in .stack__layer:nth-child(4) { transition-delay: 210ms; }
  html.is-motion .reveal.is-in .stack__layer:nth-child(5) { transition-delay: 280ms; }
}

@media (max-width: 639px) {
  .stack {
    --step: 0.4rem;
  }

  .stack__layer {
    grid-template-columns: 2.25rem minmax(0, 1fr);
    padding: 0.9rem 1rem;
  }

  .stack__nodes,
  .stack__blurb {
    grid-column: 1 / -1;
  }
}

/* ---------- Footer: continuous engineering grid ---------- */
.site-footer {
  position: relative;
  color: var(--color-muted);
  isolation: isolate;
  overflow: hidden;
  background: var(--color-surface);
  font-size: var(--text-small);
  line-height: var(--leading-small);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / var(--grid-size) var(--grid-size);
  mask-image: linear-gradient(to bottom, transparent, #000 96px);
}

.footer-grid,
.footer-meta {
  position: relative;
}

.footer-grid::before,
.footer-meta::before {
  content: "";
  position: absolute;
  inset: 0 calc((100% - 100vw) / 2);
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / var(--grid-size) var(--grid-size);
}

.footer-grid::before {
  background-position: 0 100%;
  mask-image: linear-gradient(to bottom, transparent, #000 96px);
}


.footer-cta {
  display: grid;
  gap: var(--space-5);
  padding: clamp(4rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 4.5rem);
  border-bottom: 1px solid var(--color-line-dark);
}

.footer-cta .eyebrow {
  color: var(--color-sky);
  margin-bottom: 0;
}

.footer-cta h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 1.5rem + 2vw, 3.25rem);
  line-height: 1.15;
  letter-spacing: var(--tracking-display);
  max-width: 14em;
}

.footer-cta p {
  margin: 0;
  color: var(--color-on-dark-muted);
  font-size: var(--text-lead);
}

.footer-cta__copy {
  display: grid;
  gap: var(--space-5);
}

.footer-cta p.eyebrow {
  font-size: var(--text-label);
  color: var(--color-sky);
}

@media (min-width: 900px) {
  .footer-cta {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    align-items: end;
    column-gap: var(--space-10);
  }

  .footer-cta .btn-row {
    justify-content: flex-end;
  }
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
  padding: clamp(2.5rem, 5vw, 3.5rem) 0;
}

@media (max-width: 767px) {
  .footer-brand,
  .footer-grid > :last-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
  }
}

.footer-brand img {
  height: 30px;
  width: auto;
  margin-bottom: var(--space-4);
}

.footer-brand__tag {
  margin: 0;
  max-width: 24ch;
}

.footer-grid h3 {
  margin: 0 0 var(--space-3);
  font-family: var(--font-mono), var(--font-sans);
  font-size: var(--text-label);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--color-accent);
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-grid a {
  display: inline-block;
  padding: 0.28rem 0;
  color: var(--color-muted);
  text-decoration: none;
}

.footer-grid a:hover {
  color: var(--color-accent);
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2) var(--space-5);
  padding: var(--space-5) 0 var(--space-6);
  font-size: var(--text-caption);
  color: var(--color-muted);
}

.footer-registration {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.footer-registration a {
  color: inherit;
  text-decoration: none;
}

.footer-registration a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.footer-meta p {
  margin: 0;
}

.footer-meta .mono {
  letter-spacing: 0.04em;
}
