:root {
  color-scheme: light;
  --paper: #f1f4f6;
  --surface: #ffffff;
  --ink: #111820;
  --muted: #4c5a66;
  --blue: #07558f;
  --blue-dark: #053f6b;
  --rule: #b8c4cd;
  --focus: var(--blue-dark);
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4.5rem;
  --page: min(calc(100% - 2rem), 72rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --arrival-x: -54px;
  --arrival-y: -38px;
  --tragwerk-band-left: -18px;
  --tragwerk-band-right: 18px;
  --tragwerk-mass-rise: 18px;
  --tragwerk-tower-drop: -22px;
  --tragwerk-word-left: -24px;
  --tragwerk-word-right: 24px;
  --tragwerk-legal-rise: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: clip;
  overflow-wrap: break-word;
  background: var(--paper);
  color: var(--ink);
  font-family: "Avenir Next", Avenir, Futura, "Helvetica Neue", sans-serif;
  font-size: 1rem;
  hyphens: auto;
  line-height: 1.6;
}

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

button,
a {
  font: inherit;
}

a {
  color: var(--blue-dark);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 0.13em;
}

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

.visually-hidden,
.asset-preload {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: var(--space-3);
  left: var(--space-3);
  padding: var(--space-2) var(--space-3);
  transform: translateY(-180%);
  background: var(--ink);
  color: var(--surface);
  font-weight: 700;
}

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

main {
  width: var(--page);
  margin-inline: auto;
}

.back-link {
  display: flex;
  width: var(--page);
  margin-inline: auto;
  align-items: center;
  min-height: 3.5rem;
  border-bottom: 1px solid var(--rule);
  font-weight: 600;
  text-decoration: none;
}

.lab-introduction {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.65fr);
  gap: var(--space-6);
  align-items: end;
  padding-block: clamp(2.5rem, 6vw, var(--space-7));
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  hyphens: none;
  line-height: 1.08;
  text-wrap: balance;
}

h1 {
  max-width: 16ch;
  margin-bottom: 0;
  color: var(--blue-dark);
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.025em;
}

.lab-introduction p {
  max-width: 55ch;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
}

.comparison {
  padding-bottom: var(--space-7);
}

.motion-stage {
  position: relative;
  aspect-ratio: 864 / 420;
  width: 100%;
  max-width: 54rem;
  margin-inline: auto;
  overflow: hidden;
  outline: 1px solid var(--rule);
  outline-offset: -1px;
  background: var(--surface);
}

.stage-canvas {
  position: absolute;
  top: 0;
  left: 0;
  aspect-ratio: 864 / 1821;
  width: 100%;
}

.stage-mockup {
  width: 100%;
  height: 100%;
}

.animation-controller {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 0.75fr);
  gap: var(--space-6);
  align-items: start;
  width: 100%;
  max-width: 54rem;
  margin-inline: auto;
  padding-top: var(--space-5);
}

.animation-controller button {
  min-height: 2.75rem;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--blue-dark);
  border-radius: 0;
  background: var(--surface);
  color: var(--blue-dark);
  cursor: pointer;
  font-weight: 700;
}

.animation-controller button:hover:not(:disabled) {
  background: var(--paper);
}

.animation-controller button:disabled {
  border-color: var(--rule);
  color: var(--muted);
  cursor: not-allowed;
}

.animation-selector {
  display: grid;
  border-top: 1px solid var(--ink);
}

.animation-selector button {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  gap: var(--space-3);
  align-items: start;
  min-height: 5.75rem;
  padding: var(--space-3) 0;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.animation-selector button:hover {
  background: var(--surface);
}

.animation-selector button[aria-pressed="true"] {
  border-bottom-color: var(--blue);
  color: var(--blue-dark);
}

.animation-selector button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.selector-number {
  color: var(--blue);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.selector-copy {
  display: grid;
  gap: 0.2rem;
}

.selector-copy strong {
  font-size: 1.05rem;
  line-height: 1.3;
}

.selector-copy > span {
  max-width: 52ch;
  color: var(--muted);
  font-size: 0.925rem;
  font-weight: 400;
  line-height: 1.5;
}

.animation-review {
  position: sticky;
  top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--ink);
}

.animation-review h2 {
  max-width: 18ch;
  margin-bottom: var(--space-3);
  color: var(--blue-dark);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.animation-review > p {
  max-width: 50ch;
  color: var(--muted);
}

.animation-review > button {
  margin-block: var(--space-2) var(--space-3);
  background: var(--blue-dark);
  color: var(--surface);
}

.animation-review > button:hover:not(:disabled) {
  background: var(--blue);
}

.animation-review > button:disabled {
  background: transparent;
}

.motion-status {
  min-height: 3.25rem;
  margin-bottom: 0;
  font-size: 0.925rem;
}

.motion-overlay-root,
.motion-layer {
  position: absolute;
  pointer-events: none;
  contain: paint;
}

.motion-overlay-root {
  z-index: 2;
  inset: 0;
  overflow: hidden;
}

.motion-layer {
  display: block;
  max-width: none;
  will-change: transform, opacity, clip-path;
}

.motion-clean-plate {
  top: 0.9885%;
  left: 4.8611%;
  width: 23.6111%;
  height: 7.4684%;
}

.motion-logo {
  top: 1.3%;
  left: 5.4%;
  width: 22.5%;
  height: 6.8%;
}

.motion-survey-cursor {
  top: 5.18%;
  left: 5.4%;
  width: 22.5%;
  height: 1px;
  background: var(--blue-dark);
  transform-origin: left center;
}

.motion-survey-cursor::before,
.motion-survey-cursor::after {
  position: absolute;
  top: -3px;
  width: 1px;
  height: 7px;
  background: inherit;
  content: "";
}

.motion-survey-cursor::before {
  left: 0;
}

.motion-survey-cursor::after {
  right: 0;
}

.blueprint-field {
  inset: 0;
  background: var(--paper);
  transform-origin: left center;
}

.blueprint-datum {
  top: 1.1%;
  left: 3.6%;
  width: 25.8%;
  height: 1px;
  background: var(--blue);
  transform-origin: left center;
}

.motion-relief {
  filter: drop-shadow(0.35px 0.45px 0 var(--surface)) drop-shadow(-0.35px -0.45px 0 var(--muted));
}

@media (max-width: 56rem) {
  .lab-introduction,
  .animation-controller {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  .motion-stage {
    position: sticky;
    z-index: 10;
    top: 0;
    background: var(--surface);
  }

  .animation-review {
    position: static;
  }
}

@media (max-width: 44rem) {
  :root {
    --arrival-x: -30px;
    --arrival-y: -22px;
    --tragwerk-band-left: -11px;
    --tragwerk-band-right: 11px;
    --tragwerk-mass-rise: 11px;
    --tragwerk-tower-drop: -13px;
    --tragwerk-word-left: -15px;
    --tragwerk-word-right: 15px;
    --tragwerk-legal-rise: 6px;
    --page: min(calc(100% - 2rem), 72rem);
    --space-7: 3.5rem;
  }

  .lab-introduction {
    padding-block: var(--space-6);
  }

  h1 {
    font-size: clamp(2.15rem, 10vw, 3rem);
  }

  .animation-controller {
    padding-top: var(--space-4);
  }

  .animation-selector button {
    grid-template-columns: 1.75rem minmax(0, 1fr);
    gap: var(--space-2);
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .animation-controller button,
  .animation-selector,
  .animation-review {
    border-color: CanvasText;
  }

  .motion-stage {
    outline-color: CanvasText;
  }

  .animation-selector button[aria-pressed="true"] {
    border: 2px solid Highlight;
  }
}
