/*
 * Allaix Labs landing, "The Assembly" (design/landing/assembly-brief.md).
 * Cobalt field, porcelain ink, one pilot-yellow accent, 2px machined corners.
 */

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/geist-mono-latin.woff2") format("woff2");
}

:root {
  --field: #10215f;
  --field-deep: #0a1747;
  --panel: #172c7c;
  --logo-cobalt: #3452a3;
  --porcelain: #f2f3ee;
  --mist: #a9b4da;
  --pilot: #f2d14b;
  --pilot-edge: #b89b2c;
  --line: color-mix(in srgb, var(--porcelain) 14%, transparent);
  --line-strong: color-mix(in srgb, var(--porcelain) 28%, transparent);
  --font-sans: "Wanted Sans Variable", "Wanted Sans", -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-mono: "Geist Mono", "Wanted Sans Variable", ui-monospace, "SFMono-Regular", Menlo,
    monospace;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --content: 1360px;
  --nav-h: 72px;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ------------------------------------------------------------------ base */

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

html {
  background: var(--field);
  color-scheme: dark;
  scroll-padding-top: var(--nav-h);
  -webkit-text-size-adjust: 100%;
}

/* Native smooth anchors only when Lenis is off; with Lenis it fights the scroll. */
html:not(.lenis) {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--field);
  color: var(--porcelain);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 450;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
}

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

img {
  height: auto;
}

a {
  color: inherit;
}

button,
input,
textarea {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

a,
button,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--pilot);
  color: var(--field-deep);
}

:focus-visible {
  outline: 2px solid var(--pilot);
  outline-offset: 3px;
}

main:focus {
  outline: none;
}

section[id] {
  scroll-margin-top: var(--nav-h);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 60;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.6rem 0.9rem;
  border-radius: 2px;
  background: var(--pilot);
  color: var(--field-deep);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
}

.skip-link:focus-visible {
  transform: none;
}

/* Lenis (smooth scroll) contract. */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

/* Transform-only reveals: content is always painted, only offset until seen. */
[data-reveal] {
  transition: transform 1s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}

html[data-motion="on"] [data-reveal=""] {
  transform: translate3d(0, 2.25rem, 0);
}

/* ------------------------------------------------------------------- nav */

.site-nav {
  position: fixed;
  z-index: 50;
  inset: 0 0 auto;
  padding: 0 var(--gutter);
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid transparent;
  transition:
    background-color 0.4s var(--ease-out),
    border-color 0.4s var(--ease-out);
}

/* A solid bar, not a backdrop blur: a blur re-renders over every film frame. */
.site-nav[data-scrolled="true"] {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--field-deep) 92%, transparent);
}

.site-nav__bar {
  display: flex;
  align-items: center;
  gap: 2rem;
  max-width: var(--content);
  height: var(--nav-h);
  margin: 0 auto;
}

.site-nav__brand {
  display: inline-flex;
  flex: none;
}

.site-nav__brand img {
  width: auto;
  height: 34px;
}

.site-nav__menu {
  position: relative;
  margin-left: auto;
}

.site-nav__links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.site-nav__link {
  display: inline-block;
  padding: 0.65rem 0.85rem;
  color: var(--mist);
  font-size: 0.9375rem;
  font-weight: 550;
  text-decoration: none;
  transition: color 0.25s ease;
}

.site-nav__link:hover,
.site-nav__link:focus-visible,
.site-nav__link[aria-current="page"] {
  color: var(--porcelain);
}

.site-nav__link[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--pilot);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.55em;
}

/* One hairline travels to whichever link is hovered or focused. */
.site-nav__hairline {
  position: absolute;
  bottom: 4px;
  left: 0;
  width: var(--hairline-w, 0px);
  height: 1px;
  background: var(--porcelain);
  opacity: 0;
  transform: translateX(var(--hairline-x, 0px));
  transition:
    transform 0.4s var(--ease-out),
    width 0.4s var(--ease-out),
    opacity 0.2s ease;
  pointer-events: none;
}

.site-nav__menu[data-hairline="on"] .site-nav__hairline {
  opacity: 1;
}

/* Nav CTA: a machined slide switch that powers on under the pointer. */
.nav-switch {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.75rem;
  padding: 0 0.25rem;
  color: var(--porcelain);
  font-size: 0.9375rem;
  font-weight: 650;
  text-decoration: none;
}

.nav-switch__track {
  position: relative;
  width: 2.25rem;
  height: 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: color-mix(in srgb, var(--field-deep) 60%, transparent);
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    transform 0.15s ease;
}

.nav-switch__knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(1.25rem - 6px);
  height: calc(1.25rem - 6px);
  border-radius: 1px;
  background: var(--mist);
  transition:
    transform 0.35s var(--ease-out),
    background-color 0.3s ease;
}

.nav-switch:hover .nav-switch__track,
.nav-switch:focus-visible .nav-switch__track {
  border-color: var(--pilot);
  background: var(--pilot);
}

.nav-switch:hover .nav-switch__knob,
.nav-switch:focus-visible .nav-switch__knob {
  background: var(--field-deep);
  transform: translateX(1rem);
}

.nav-switch:active .nav-switch__track {
  transform: scale(0.96);
}

/* --------------------------------------------------------------- journey */

.journey {
  position: relative;
  isolation: isolate;
  background: var(--field);
}

.journey__stage {
  position: sticky;
  z-index: 0;
  top: 0;
  width: 100%;
  /* Large viewport height: the film keeps covering the screen while a mobile
     URL bar hides, and nothing reflows mid-scroll. */
  height: 100vh;
  height: 100lvh;
  overflow: hidden;
  background: var(--field);
}

/* Keeps the nav legible over the film, then lets the film settle into the field. */
.journey__stage::before,
.journey__stage::after {
  position: absolute;
  z-index: 4;
  right: 0;
  left: 0;
  content: "";
  pointer-events: none;
}

.journey__stage::before {
  top: 0;
  height: 9rem;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--field) 72%, transparent), transparent);
}

.journey__stage::after {
  bottom: 0;
  height: 14vh;
  background: linear-gradient(to bottom, transparent, var(--field));
}

.journey__media,
.journey__layer,
.journey__picture,
.journey__poster,
.journey__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Desktop reframe: from chapter 3 the film eases right and settles smaller so
   the copy column on the left stays clear of the assembled device. */
.journey__media {
  transform: translate3d(var(--mx, 0px), 0, 0) scale(var(--ms, 1));
  transform-origin: 50% 50%;
}

@media (min-width: 861px) and (hover: hover) {
  .journey__media {
    -webkit-mask-image:
      linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%),
      linear-gradient(to bottom, transparent 0, #000 7%, #000 93%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
      linear-gradient(to right, transparent 0, #000 7%, #000 93%, transparent 100%),
      linear-gradient(to bottom, transparent 0, #000 7%, #000 93%, transparent 100%);
    mask-composite: intersect;
    will-change: transform;
  }
}

.journey__layer {
  margin: 0;
  overflow: hidden;
  opacity: 0;
}

.journey__layer:first-child {
  opacity: 1;
}

.journey__poster,
.journey__video {
  max-width: none;
  object-fit: cover;
  object-position: 50% 50%;
}

.journey__video {
  z-index: 1;
}

.journey__layer[data-painted="true"] .journey__poster {
  visibility: hidden;
}

/* Chapter rail: an instrument scale on the right edge. */
.journey__rail {
  position: absolute;
  z-index: 6;
  top: 50%;
  right: clamp(1rem, 2.4vw, 2.5rem);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
  transform: translateY(-50%);
}

.journey__jump {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.25rem;
  padding: 0.35rem 0 0.35rem 0.75rem;
  border: 0;
  background: transparent;
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.journey__jump::after {
  width: 0.9rem;
  height: 1px;
  background: currentColor;
  content: "";
  transition:
    width 0.4s var(--ease-out),
    background-color 0.3s ease;
}

.journey__jump:hover,
.journey__jump[aria-current="step"] {
  color: var(--porcelain);
}

.journey__jump[aria-current="step"]::after {
  width: 2.25rem;
  height: 2px;
  background: var(--pilot);
}

.journey__story {
  position: relative;
  z-index: 3;
  margin-top: -100vh;
  margin-top: -100lvh;
  pointer-events: none;
}

.chapter {
  position: relative;
  /* Small viewport height: fixed band lengths, so the scroll-to-film map never moves. */
  min-height: calc(var(--weight, 1.3) * 100vh);
  min-height: calc(var(--weight, 1.3) * 100svh);
}

.chapter__pin {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(5rem, 9vw, 8rem) var(--gutter);
}

.chapter[data-align="right"] .chapter__pin {
  justify-content: flex-end;
  padding-right: calc(var(--gutter) + 5.5rem);
}

.chapter__copy {
  position: relative;
  width: min(46rem, 52vw);
  pointer-events: auto;
}

.chapter__copy::before {
  position: absolute;
  z-index: -1;
  inset: -4rem -6rem;
  background: radial-gradient(
    ellipse at center,
    color-mix(in srgb, var(--field) 88%, transparent) 0%,
    color-mix(in srgb, var(--field) 58%, transparent) 52%,
    transparent 76%
  );
  content: "";
  pointer-events: none;
}

.chapter__kicker {
  margin-bottom: 1.35rem;
  color: var(--pilot);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.chapter__title {
  max-width: 12em;
  font-size: clamp(2.4rem, 4.3vw, 4.75rem);
  font-weight: 790;
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.chapter__body {
  max-width: 29em;
  margin-top: 1.5rem;
  color: var(--mist);
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  line-height: 1.75;
}

/* Proof tags read as a spec line, not pills over the film. */
.chapter__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0;
  margin-top: 1.75rem;
  list-style: none;
}

.chapter__tags li {
  color: var(--porcelain);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.01em;
}

.chapter__tags li + li::before {
  margin: 0 0.7em;
  color: color-mix(in srgb, var(--porcelain) 32%, transparent);
  content: "/";
}

.chapter__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2.25rem;
}

/* The opening chapter builds on load (never gated on the viewport). */
@media (prefers-reduced-motion: no-preference) {
  .chapter:first-child .chapter__kicker,
  .chapter:first-child .chapter__title,
  .chapter:first-child .chapter__body,
  .chapter:first-child .chapter__actions {
    animation: chapter-rise 1.1s var(--ease-out) backwards;
  }

  .chapter:first-child .chapter__title {
    animation-delay: 0.12s;
  }

  .chapter:first-child .chapter__body {
    animation-delay: 0.3s;
  }

  .chapter:first-child .chapter__actions {
    animation-delay: 0.45s;
  }
}

@keyframes chapter-rise {
  from {
    clip-path: inset(0 0 100% 0);
    transform: translateY(1.25rem);
  }

  to {
    clip-path: inset(-1rem);
    transform: none;
  }
}

/* Hero CTA: two plates of one key, exploded by a hair, lock on hover. */
.assemble-cta {
  --pull-x: 0px;
  --pull-y: 0px;
  display: inline-flex;
  align-items: center;
  color: var(--field-deep);
  text-decoration: none;
  filter: drop-shadow(0 18px 22px rgba(3, 8, 32, 0.55));
  transform: translate3d(var(--pull-x), var(--pull-y), 0);
  transition: transform 0.6s var(--ease-out);
}

.assemble-cta__plate {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  height: 3.25rem;
  padding: 0 1.2rem;
  background: var(--porcelain);
  font-size: 1rem;
  font-weight: 720;
  letter-spacing: -0.01em;
  transition: transform 0.5s var(--ease-out);
}

.assemble-cta__plate--left {
  padding-right: 1rem;
  border-radius: 2px 0 0 2px;
}

.assemble-cta__plate--right {
  padding-left: 1rem;
  border-radius: 0 2px 2px 0;
}

@media (hover: hover) and (pointer: fine) {
  .assemble-cta__plate--left {
    transform: translateY(-2px);
  }

  .assemble-cta__plate--right {
    transform: translateY(2px);
  }
}

.assemble-cta__seam {
  position: relative;
  z-index: 1;
  width: 1px;
  height: 3.25rem;
}

.assemble-cta__seam::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pilot);
  box-shadow: 0 0 0 2px var(--porcelain);
  content: "";
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.3s var(--ease-out) 0.18s;
}

.assemble-cta:hover .assemble-cta__plate,
.assemble-cta:focus-visible .assemble-cta__plate {
  transform: none;
}

.assemble-cta:hover .assemble-cta__seam::after,
.assemble-cta:focus-visible .assemble-cta__seam::after {
  transform: translate(-50%, -50%) scale(1);
}

.assemble-cta:active .assemble-cta__plate {
  transform: scale(0.98);
}

.assemble-cta:focus-visible {
  outline: none;
}

.assemble-cta:focus-visible .assemble-cta__plate {
  outline: 2px solid var(--pilot);
  outline-offset: 3px;
}

/* Secondary link: an arrow head travels down a short drawn rail. */
.rail-link {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 3.25rem;
  padding: 0 0.5rem;
  color: var(--porcelain);
  font-weight: 620;
  text-decoration: none;
}

.rail-link__rail {
  position: relative;
  width: 1px;
  height: 1.9rem;
  background: var(--line-strong);
}

.rail-link__head {
  position: absolute;
  top: -2px;
  left: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--porcelain);
  border-bottom: 1.5px solid var(--porcelain);
  transform: translate(-50%, 0) rotate(45deg);
}

.rail-link:hover .rail-link__head,
.rail-link:focus-visible .rail-link__head {
  animation: rail-travel 0.8s var(--ease-out) both;
}

@keyframes rail-travel {
  from {
    transform: translate(-50%, 0) rotate(45deg);
  }

  to {
    transform: translate(-50%, 1.45rem) rotate(45deg);
  }
}

/* ------------------------------------------------------------------ work */

.work {
  position: relative;
  overflow: hidden;
  padding: clamp(6rem, 12vw, 11rem) 0 clamp(5rem, 10vw, 9rem);
  background: var(--field);
}

.work__inner {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2vw, 2rem);
  row-gap: clamp(3rem, 6vw, 5.5rem);
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.work__head {
  grid-column: 1 / span 5;
  grid-row: 1;
}

.work__title {
  font-size: clamp(2.6rem, 5.2vw, 5.25rem);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.work__lead {
  max-width: 22em;
  margin-top: 1.5rem;
  color: var(--mist);
  font-size: 1.0625rem;
  line-height: 1.75;
}

/* Link from the two live products to the full solutions catalog. */
.work__more {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--line-strong);
  color: var(--porcelain);
  font-weight: 620;
  text-decoration: none;
  transition: border-color 0.3s ease;
}

.work__more svg {
  transition: transform 0.35s var(--ease-out);
}

.work__more:hover,
.work__more:focus-visible {
  border-color: var(--pilot);
}

.work__more:hover svg,
.work__more:focus-visible svg {
  transform: translateX(4px);
}

.work-piece {
  position: relative;
  display: grid;
  align-content: start;
  gap: 1.5rem;
  color: inherit;
  text-decoration: none;
}

.work-piece:focus-visible {
  outline: none;
}

.work-piece:focus-visible .work-piece__frame {
  outline: 2px solid var(--pilot);
  outline-offset: 4px;
}

/* Large frame bleeds off the right edge of the viewport. */
.work-piece--wide {
  grid-column: 6 / -1;
  grid-row: 1 / span 2;
  margin-top: 2rem;
  margin-right: calc(-1 * (var(--gutter) + max(0px, (100vw - var(--content)) / 2)));
}

.work-piece--wide .work-piece__frame {
  aspect-ratio: 1600 / 964;
}

/* Tall frame sits on a cobalt rule that starts at a single pilot mark. */
.work-piece--tall {
  grid-column: 1 / span 5;
  grid-row: 2;
  grid-template-columns: minmax(0, 1fr) minmax(0, 14.5rem);
  align-items: end;
  column-gap: 1.75rem;
  padding-top: 2.75rem;
}

.work-piece--tall::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--logo-cobalt);
  content: "";
}

.work-piece--tall::after {
  position: absolute;
  top: -4px;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 1px;
  background: var(--pilot);
  content: "";
}

.work-piece--tall .work-piece__label {
  align-self: center;
}

.work-piece--tall .work-piece__frame {
  aspect-ratio: 9 / 17;
}

.work-piece__name {
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 760;
  letter-spacing: -0.03em;
}

.work-piece__desc {
  max-width: 26em;
  margin-top: 0.5rem;
  color: var(--mist);
  font-size: 0.975rem;
  line-height: 1.7;
}

.work-piece__domain {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 1rem;
  color: var(--porcelain);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.work-piece__domain svg {
  transition: transform 0.35s var(--ease-out);
}

.work-piece:hover .work-piece__domain svg,
.work-piece:focus-visible .work-piece__domain svg {
  transform: translate(3px, -3px);
}

.work-piece__frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--field-deep);
  box-shadow: 0 48px 90px -48px rgba(2, 6, 24, 0.85);
}

.work-piece__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 1.2s var(--ease-out);
}

.work-piece:hover .work-piece__frame img,
.work-piece:focus-visible .work-piece__frame img {
  transform: scale(1.045) translateY(-1.5%);
}

/* Viewfinder brackets close around the frame. */
.work-piece__bracket {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 0 solid var(--pilot);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    transform 0.45s var(--ease-out);
}

.work-piece__bracket--tl {
  top: 12px;
  left: 12px;
  border-top-width: 2px;
  border-left-width: 2px;
  transform: translate(-8px, -8px);
}

.work-piece__bracket--tr {
  top: 12px;
  right: 12px;
  border-top-width: 2px;
  border-right-width: 2px;
  transform: translate(8px, -8px);
}

.work-piece__bracket--bl {
  bottom: 12px;
  left: 12px;
  border-bottom-width: 2px;
  border-left-width: 2px;
  transform: translate(-8px, 8px);
}

.work-piece__bracket--br {
  right: 12px;
  bottom: 12px;
  border-right-width: 2px;
  border-bottom-width: 2px;
  transform: translate(8px, 8px);
}

.work-piece:hover .work-piece__bracket,
.work-piece:focus-visible .work-piece__bracket {
  opacity: 1;
  transform: none;
}

/* -------------------------------------------------------------- services */

.svc {
  position: relative;
  padding: clamp(6rem, 11vw, 10rem) 0;
  background: linear-gradient(to bottom, var(--field), var(--field-deep) 140%);
}

.svc__inner {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  column-gap: clamp(2rem, 5vw, 5rem);
  row-gap: clamp(2.5rem, 5vw, 4rem);
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.svc__head,
.svc__list {
  grid-column: 1;
}

.svc__title {
  font-size: clamp(2.3rem, 4.4vw, 4.25rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.svc__lead {
  max-width: 30em;
  margin-top: 1.25rem;
  color: var(--mist);
  font-size: 1.0625rem;
  line-height: 1.75;
}

.svc__list {
  border-top: 1px solid var(--line-strong);
  list-style: none;
}

.svc-row {
  border-bottom: 1px solid var(--line);
}

/* Row CTA: the whole band shifts tone, a pilot tick rises, the numeral slides. */
.svc-row__band {
  position: relative;
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 1rem;
  width: 100%;
  padding: 1.35rem 1rem 1.35rem 1.25rem;
  border: 0;
  background: transparent;
  color: var(--mist);
  text-align: left;
  transition: background-color 0.35s ease;
}

.svc-row__band::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 3px;
  height: 1.4rem;
  background: var(--pilot);
  content: "";
  transform: translateY(-50%) scaleY(0);
  transition: transform 0.35s var(--ease-out);
}

.svc-row__band:active {
  transform: translateY(1px);
}

.svc-row__num {
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  transition:
    transform 0.35s var(--ease-out),
    color 0.3s ease;
}

.svc-row__name {
  color: var(--porcelain);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.svc-row__sub {
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-align: right;
}

.svc-row[data-active="true"] .svc-row__band {
  background: linear-gradient(90deg, color-mix(in srgb, var(--panel) 92%, transparent), transparent 88%);
}

.svc-row[data-active="true"] .svc-row__band::before {
  transform: translateY(-50%) scaleY(1);
}

.svc-row[data-active="true"] .svc-row__num {
  color: var(--pilot);
  transform: translateX(4px);
}

.svc-row__detail {
  display: none;
}

/* Sticky preview panel on the cobalt grain plate. */
.svc__panel {
  position: sticky;
  top: 96px;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: start;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--panel) url("plates/cobalt-grain.webp") center / cover;
}

.svc__stage {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.svc__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition:
    opacity 0.5s ease,
    transform 0.9s var(--ease-out);
}

.svc__image[data-active="true"] {
  opacity: 1;
  transform: none;
}

.svc__caption {
  padding: 1.5rem 1.75rem 1.9rem;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--panel) 68%, transparent), var(--panel));
}

.svc__index {
  color: var(--pilot);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.svc__name {
  margin-top: 0.6rem;
  font-size: 1.5rem;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.svc__body {
  margin-top: 0.75rem;
  color: color-mix(in srgb, var(--porcelain) 88%, var(--panel));
  font-size: 0.975rem;
  line-height: 1.75;
}

.svc__sub {
  margin-top: 1rem;
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* --------------------------------------------------------------- process */

.process {
  padding: clamp(6rem, 11vw, 10rem) 0;
  background: var(--field-deep);
}

.process__inner {
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.process__head {
  max-width: 36rem;
}

.process__title {
  font-size: clamp(2.4rem, 4.8vw, 4.5rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.process__lead {
  margin-top: 1.25rem;
  color: var(--mist);
  font-size: 1.0625rem;
  line-height: 1.75;
}

.process__track {
  position: relative;
  margin-top: clamp(3.5rem, 7vw, 6rem);
}

.process__line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--line-strong);
}

.process__fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -0.5px;
  width: 2px;
  background: var(--pilot);
  transform: scaleY(0);
  transform-origin: top;
}

.process__rail {
  display: grid;
  gap: clamp(2.75rem, 5vw, 4.5rem);
  list-style: none;
}

.station {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4.5rem minmax(0, 1fr);
  align-items: start;
}

/* Short tick from the line to the station copy. */
.station::before {
  position: absolute;
  top: calc(0.9rem + 5px);
  width: 1.5rem;
  height: 1px;
  background: var(--line-strong);
  content: "";
}

.station[data-side="right"]::before {
  left: calc(50% + 0.6rem);
}

.station[data-side="left"]::before {
  right: calc(50% + 0.6rem);
}

.station__marker {
  z-index: 1;
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  width: 11px;
  height: 11px;
  margin-top: 0.9rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--field-deep);
  transition:
    background-color 0.35s ease,
    border-color 0.35s ease,
    transform 0.35s var(--ease-out);
}

.station[data-lit="true"] .station__marker {
  border-color: var(--pilot);
  background: var(--pilot);
  transform: rotate(45deg);
}

.station__body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  column-gap: 1.25rem;
  row-gap: 0.5rem;
}

.station__num {
  grid-row: 1 / span 2;
  color: var(--porcelain);
  font-family: var(--font-mono);
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.station__title {
  font-size: clamp(1.2rem, 1.7vw, 1.5rem);
  font-weight: 720;
  letter-spacing: -0.02em;
}

.station__text {
  grid-column: 2;
  color: var(--mist);
  font-size: 0.98rem;
  line-height: 1.7;
}

/* Generated line icons, used as masks so they take the porcelain ink. */
.station__icon {
  width: 3rem;
  height: 3rem;
  background: var(--porcelain);
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.station__icon--diagnose {
  --icon: url("icons/diagnose.png");
}

.station__icon--route {
  --icon: url("icons/route.png");
}

.station__icon--verify {
  --icon: url("icons/verify.png");
}

.station__icon--teach {
  --icon: url("icons/teach.png");
}

.station__icon--improve {
  --icon: url("icons/improve.png");
}

.station[data-side="right"] .station__body {
  grid-column: 3;
  grid-row: 1;
  padding-right: 4.5rem;
}

.station[data-side="right"] .station__icon {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}

.station[data-side="left"] .station__body {
  grid-column: 1;
  grid-row: 1;
  padding-left: 4.5rem;
}

.station[data-side="left"] .station__icon {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
}

/* --------------------------------------------------------------- contact */

.contact {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(6rem, 12vw, 11rem) 0 clamp(5rem, 9vw, 8rem);
  background: var(--field);
}

/* The logo's X as structure: cropped by the section's left edge. */
.contact__glyph {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 0;
  width: auto;
  max-width: none;
  height: 100%;
  transform: translate(-50%, -50%);
}

.contact__glyph-bar {
  fill: var(--porcelain);
}

.contact__glyph-cut {
  fill: var(--logo-cobalt);
}

.contact__inner {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 4fr) minmax(0, 4.4fr);
  column-gap: clamp(2rem, 4vw, 4rem);
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.contact__lead {
  grid-column: 2;
  align-self: center;
}

.contact-form,
.contact-done {
  grid-column: 3;
}

.contact__title {
  font-size: clamp(2.2rem, 4vw, 3.9rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.contact__text {
  max-width: 24em;
  margin-top: 1.25rem;
  color: var(--mist);
  font-size: 1.0625rem;
  line-height: 1.75;
}

.email-chip {
  display: inline-flex;
  align-items: stretch;
  margin-top: 2rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
}

.email-chip__address {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1rem;
  color: var(--porcelain);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.email-chip__address:hover {
  color: var(--pilot);
}

.email-chip__icon {
  width: 1rem;
  height: 1rem;
  margin-right: 0.6rem;
  background: currentColor;
  -webkit-mask: url("icons/mail.png") center / contain no-repeat;
  mask: url("icons/mail.png") center / contain no-repeat;
}

/* Copy chip flips like a material sample. */
.email-chip__flip {
  position: relative;
  width: 4.75rem;
  border: 0;
  border-left: 1px solid var(--line-strong);
  background: transparent;
  color: var(--mist);
  font-size: 0.8125rem;
  perspective: 400px;
}

.email-chip__flip:hover {
  color: var(--porcelain);
}

.email-chip__face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  backface-visibility: hidden;
  transition: transform 0.45s var(--ease-out);
}

.email-chip__face--back {
  background: var(--pilot);
  color: var(--field-deep);
  font-weight: 650;
  transform: rotateX(180deg);
}

.email-chip__flip[data-copied="true"] .email-chip__face {
  transform: rotateX(-180deg);
}

.email-chip__flip[data-copied="true"] .email-chip__face--back {
  transform: rotateX(0deg);
}

.contact-form {
  position: relative;
  display: grid;
  gap: 1.35rem;
}

.field {
  display: grid;
  gap: 0.5rem;
}

.field__label {
  color: var(--porcelain);
  font-size: 0.9rem;
  font-weight: 600;
}

.field__req {
  margin-left: 0.2rem;
  color: var(--pilot);
}

.field__control {
  width: 100%;
  min-height: 3.1rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: color-mix(in srgb, var(--field-deep) 55%, transparent);
  color: var(--porcelain);
  font-size: 1rem;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease,
    box-shadow 0.2s ease;
}

.field__control:hover {
  border-color: color-mix(in srgb, var(--porcelain) 45%, transparent);
}

.field__control:focus {
  border-color: var(--pilot);
  outline: none;
  background: var(--field-deep);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pilot) 24%, transparent);
}

.field__control--area {
  min-height: 9rem;
  line-height: 1.65;
  resize: vertical;
}

.field[data-invalid="true"] .field__control {
  border-color: var(--pilot);
}

.field__error {
  color: var(--pilot);
  font-size: 0.85rem;
}

.contact-form__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.consent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 0.75rem;
  row-gap: 0.35rem;
}

.consent__box {
  display: grid;
  place-content: center;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
  appearance: none;
}

.consent__box::after {
  width: 0.6rem;
  height: 0.6rem;
  background: var(--pilot);
  content: "";
  transform: scale(0);
  transition: transform 0.2s var(--ease-out);
}

.consent__box:checked,
.consent[data-invalid="true"] .consent__box {
  border-color: var(--pilot);
}

.consent__box:checked::after {
  transform: scale(1);
}

.consent__box:focus-visible {
  outline: 2px solid var(--pilot);
  outline-offset: 2px;
}

.consent__label {
  font-size: 0.925rem;
  cursor: pointer;
}

.consent__note,
.consent__error {
  grid-column: 2;
}

.consent__note {
  color: var(--mist);
  font-size: 0.8rem;
  line-height: 1.6;
}

.contact-form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 0.5rem;
}

/* Submit: one physical pilot-yellow keycap that presses down. */
.keycap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  min-width: 12.5rem;
  height: 3.5rem;
  padding: 0 1.3rem;
  overflow: hidden;
  border: 0;
  border-radius: 2px;
  background: var(--pilot);
  box-shadow:
    0 4px 0 var(--pilot-edge),
    0 18px 30px -16px rgba(2, 6, 24, 0.9);
  color: var(--field-deep);
  font-size: 1rem;
  font-weight: 750;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
}

.keycap:hover {
  box-shadow:
    0 5px 0 var(--pilot-edge),
    0 22px 34px -16px rgba(2, 6, 24, 0.9);
  transform: translateY(-1px);
}

.keycap:active {
  box-shadow:
    0 0 0 var(--pilot-edge),
    0 8px 14px -10px rgba(2, 6, 24, 0.9);
  transform: translateY(4px);
}

.keycap:disabled {
  cursor: progress;
}

.keycap:disabled::after {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32%;
  height: 3px;
  background: var(--field-deep);
  content: "";
  animation: keycap-scan 1s linear infinite;
}

@keyframes keycap-scan {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(320%);
  }
}

.contact-form__alert {
  color: var(--pilot);
  font-size: 0.9rem;
}

.contact-done {
  align-self: center;
  padding: 2.25rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--panel);
}

.contact-done__lamp {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--pilot);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--pilot) 22%, transparent);
}

.contact-done__title {
  margin-top: 1.25rem;
  font-size: 1.6rem;
  font-weight: 750;
  outline: none;
}

.contact-done__text {
  margin-top: 0.75rem;
  color: var(--mist);
  line-height: 1.7;
}

@supports (animation-timeline: view()) {
  @media (min-width: 1024px) and (prefers-reduced-motion: no-preference) {
    .contact__glyph {
      animation: glyph-drift linear both;
      animation-timeline: view();
    }
  }
}

@keyframes glyph-drift {
  from {
    transform: translate(-50%, -44%);
  }

  to {
    transform: translate(-50%, -56%);
  }
}

/* ---------------------------------------------------------------- footer */

.footer {
  padding: clamp(4rem, 7vw, 6rem) 0 2rem;
  border-top: 1px solid var(--line);
  background: var(--field-deep);
}

.footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) auto;
  align-items: start;
  gap: 2.5rem;
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.footer__brand img {
  width: auto;
  height: 44px;
}

.footer__brand p {
  max-width: 20em;
  margin-top: 1.25rem;
  color: var(--mist);
  font-size: 0.95rem;
  line-height: 1.7;
}

.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.footer__label {
  margin-bottom: 1rem;
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.footer__col ul {
  display: grid;
  gap: 0.6rem;
  list-style: none;
}

.footer__col li,
.footer__col a {
  color: var(--porcelain);
  font-size: 0.95rem;
  text-decoration: none;
}

.footer__col a:hover,
.footer__col a:focus-visible {
  color: var(--pilot);
}

/* Circular badge: the ring of text turns as the pointer arrives. */
.top-badge {
  position: relative;
  display: grid;
  place-items: center;
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 50%;
  color: var(--porcelain);
}

.top-badge::before {
  position: absolute;
  inset: 1.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  content: "";
  transition: border-color 0.3s ease;
}

.top-badge__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: currentColor;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  transition: transform 1.2s var(--ease-out);
}

.top-badge__arrow {
  width: 22px;
  height: 22px;
  transition: transform 0.35s var(--ease-out);
}

.top-badge:hover .top-badge__ring,
.top-badge:focus-visible .top-badge__ring {
  transform: rotate(-120deg);
}

.top-badge:hover .top-badge__arrow,
.top-badge:focus-visible .top-badge__arrow {
  transform: translateY(-4px);
}

.top-badge:hover::before,
.top-badge:focus-visible::before {
  border-color: var(--pilot);
}

.footer__base {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--content);
  margin: 3.5rem auto 0;
  padding: 1.5rem var(--gutter) 0;
  border-top: 1px solid var(--line);
  color: var(--mist);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 1100px) {
  .work__head,
  .work-piece--tall {
    grid-column: 1 / span 6;
  }

  .work-piece--wide {
    grid-column: 7 / -1;
  }
}

@media (max-width: 1023px) {
  .svc__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .svc__panel {
    display: none;
  }

  .svc-row__band {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    row-gap: 0.4rem;
  }

  .svc-row__sub {
    grid-column: 2;
    text-align: left;
  }

  .svc-row[data-active="true"] .svc-row__detail {
    display: grid;
    gap: 1.1rem;
    padding: 0.25rem 1rem 1.75rem 3.75rem;
  }

  .svc-row__detail img {
    width: 100%;
    aspect-ratio: 4 / 3;
    border: 1px solid var(--line);
    border-radius: 2px;
    object-fit: cover;
  }

  .svc-row__detail p {
    color: color-mix(in srgb, var(--porcelain) 88%, var(--field));
    font-size: 0.975rem;
    line-height: 1.75;
  }

  .contact {
    padding-top: 15rem;
  }

  .contact__glyph {
    top: 2.5rem;
    height: 11rem;
    transform: translateX(-22%);
  }

  .contact__inner {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 3rem;
  }

  .contact__lead,
  .contact-form,
  .contact-done {
    grid-column: 1;
  }
}

@media (max-width: 860px) {
  :root {
    --nav-h: 60px;
  }

  .site-nav__bar {
    justify-content: space-between;
  }

  .site-nav__brand img {
    height: 28px;
  }

  .site-nav__menu,
  .journey__rail {
    display: none;
  }

  .chapter__pin,
  .chapter[data-align="right"] .chapter__pin {
    align-items: flex-end;
    justify-content: flex-start;
    padding: 6.5rem max(1.25rem, env(safe-area-inset-right)) calc(3.5rem + env(safe-area-inset-bottom))
      max(1.25rem, env(safe-area-inset-left));
  }

  .chapter__copy {
    width: min(100%, 36rem);
  }

  .chapter__copy::before {
    inset: -3rem -2rem;
    background: linear-gradient(
      to top,
      var(--field) 0%,
      color-mix(in srgb, var(--field) 82%, transparent) 58%,
      transparent 100%
    );
  }

  .chapter__title {
    font-size: clamp(1.9rem, 8.4vw, 3rem);
  }

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

  .work__head,
  .work-piece--wide,
  .work-piece--tall {
    grid-column: 1;
    grid-row: auto;
  }

  .work-piece--wide {
    margin-top: 0;
    margin-right: calc(-1 * var(--gutter));
  }

  .work-piece--tall {
    grid-template-columns: minmax(0, 1fr) minmax(0, 10.5rem);
    column-gap: 1.25rem;
  }

  .process__line {
    left: 5px;
  }

  .station {
    grid-template-columns: 1.75rem minmax(0, 1fr);
  }

  .station::before {
    display: none;
  }

  .station__marker {
    grid-column: 1;
    justify-self: start;
  }

  .station[data-side] .station__body {
    grid-column: 2;
    grid-row: 1;
    padding: 0;
  }

  .station[data-side] .station__icon {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    width: 2.25rem;
    height: 2.25rem;
    margin-top: 1rem;
  }

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

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

  .top-badge {
    justify-self: end;
  }

  .footer__base {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .work-piece--tall {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 1.5rem;
  }

  .work-piece--tall .work-piece__frame {
    max-width: 15rem;
  }

  .svc-row[data-active="true"] .svc-row__detail {
    padding-left: 1.25rem;
  }
}

/* --------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .assemble-cta__plate--left,
  .assemble-cta__plate--right {
    transform: none;
  }
}
