.quality-page {
  --quality-paper: #d8d5cc;
  --quality-paper-edge: #aaa79e;
  --quality-ink: #373b3c;
  --quality-ink-soft: rgba(55, 59, 60, .34);
  background:
    radial-gradient(circle at 74% 36%, rgba(36, 43, 47, .15), transparent 38%),
    #030506;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 11px 14px;
  background: var(--text, #f2f4f4);
  color: var(--bg, #030506);
  font-size: 13px;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

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

.quality-page .site-header {
  background: rgba(3, 5, 6, .82);
}

.quality-page .site-nav a[aria-current='page'] {
  color: var(--amber, #e7a437);
}

.header-crosshair {
  position: relative;
  display: block;
  width: 28px;
  height: 28px;
  color: #6f797e;
}

.header-crosshair::before,
.header-crosshair::after,
.header-crosshair i::before {
  position: absolute;
  content: '';
}

.header-crosshair::before {
  top: 13px;
  left: 0;
  width: 28px;
  height: 1px;
  background: currentColor;
}

.header-crosshair::after {
  top: 0;
  left: 13px;
  width: 1px;
  height: 28px;
  background: currentColor;
}

.header-crosshair i::before {
  top: 9px;
  left: 9px;
  width: 8px;
  height: 8px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: #030506;
}

.quality-story {
  --quality-p: 1;
  --scan-p: 1;
  --stamp-align: 1;
  --stamp-down: 1;
  --stamp-up: 1;
  --stamp-retreat: 1;
  --stamp-settle: 1;
  --impact-p: 0;
  --contact-p: 0;
  --mark-p: 1;
  --stamp-load: 0;
  position: relative;
  min-height: 100svh;
  background:
    linear-gradient(115deg, rgba(4, 7, 8, .97) 0 27%, rgba(4, 7, 8, .72) 45%, rgba(2, 4, 5, .16) 76%),
    #030506;
}

.quality-js .quality-story {
  height: 235svh;
}

.quality-sticky {
  position: relative;
  top: 0;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
}

.quality-js .quality-sticky {
  position: sticky;
}

.quality-sticky::before,
.quality-sticky::after {
  position: absolute;
  z-index: -1;
  content: '';
  pointer-events: none;
}

.quality-sticky::before {
  inset: var(--header-height, 76px) 0 0;
  background:
    radial-gradient(circle at 78% 44%, rgba(104, 118, 124, .08), transparent 33%),
    linear-gradient(180deg, transparent 72%, rgba(0, 0, 0, .58));
}

.quality-sticky::after {
  right: -7vw;
  bottom: -19vh;
  width: 54vw;
  height: 45vh;
  border: 1px solid rgba(79, 91, 97, .13);
  transform: skewX(-36deg);
}

.quality-copy {
  position: absolute;
  z-index: 12;
  top: clamp(126px, 17vh, 180px);
  left: 4vw;
  width: min(31vw, 430px);
}

.quality-copy h1 {
  margin: 0;
  font-size: clamp(68px, 7.2vw, 122px);
  font-weight: 400;
  line-height: .92;
  letter-spacing: -.065em;
}

.quality-lead {
  max-width: 360px;
  margin: 34px 0 0;
  color: #c4c9cb;
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.42;
}

.quality-visual {
  position: absolute;
  z-index: 4;
  inset: calc(var(--header-height, 76px) + 6px) 0 0 24vw;
  pointer-events: none;
  perspective: 1500px;
  transform: translate3d(0, calc(var(--impact-p) * 2px), 0);
}

.quality-space {
  position: absolute;
  inset: 1% -2% auto auto;
  width: min(78vw, 1160px);
  height: auto;
  opacity: calc(.2 + var(--quality-p) * .35);
  transform: translate3d(calc((1 - var(--quality-p)) * 28px), calc((1 - var(--quality-p)) * -10px), 0);
}

.space-lines,
.space-crosses {
  stroke: #657178;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.space-lines {
  opacity: .24;
}

.space-crosses {
  opacity: .48;
}

.quality-object-plane {
  --stamp-width: clamp(155px, 17vw, 245px);
  --stamp-lift: 128px;
  --stamp-approach: 80px;
  --stamp-retreat-x: 66px;
  --stamp-retreat-y: 42px;
  position: absolute;
  z-index: 2;
  top: clamp(96px, 11.5vh, 126px);
  right: clamp(100px, 8vw, 150px);
  width: min(55vw, 800px);
  aspect-ratio: 1.415;
  transform: translate3d(
    calc((1 - var(--quality-p)) * 28px),
    calc(((1 - var(--quality-p)) * 36px) + (var(--impact-p) * 1px)),
    0
  ) rotateX(4deg) rotateY(-5deg) rotateZ(7deg);
  transform-origin: center;
}

.technical-sheet {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(224, 221, 211, .48);
  background:
    repeating-linear-gradient(8deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 7px),
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, .56), transparent 29%),
    linear-gradient(135deg, #e4e1d9 0%, var(--quality-paper) 46%, #c7c4bc 100%);
  box-shadow:
    0 calc(48px - (var(--impact-p) * 5px)) 70px rgba(0, 0, 0, .55),
    0 4px 2px rgba(255, 255, 255, .12) inset;
  color: var(--quality-ink);
  transform: scaleY(calc(1 - (var(--impact-p) * .002)));
  transform-origin: 50% 85%;
}

.quality-scene-caption {
  position: absolute;
  z-index: 12;
  right: 4vw;
  bottom: 16px;
  margin: 0;
  color: #899399;
  font-size: 10px;
  letter-spacing: .09em;
}

.technical-sheet::before,
.technical-sheet::after {
  position: absolute;
  z-index: 5;
  content: '';
  pointer-events: none;
}

.technical-sheet::before {
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .12), transparent 6% 92%, rgba(0, 0, 0, .08)),
    linear-gradient(180deg, rgba(255, 255, 255, .18), transparent 8% 91%, rgba(0, 0, 0, .12));
  mix-blend-mode: multiply;
}

.technical-sheet::after {
  top: 0;
  right: 0;
  width: 19%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(68, 65, 60, .08));
}

.sheet-edge {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 10px;
  background: linear-gradient(180deg, var(--quality-paper-edge), #79776f);
  transform: translateY(4px);
}

.sheet-meta {
  position: absolute;
  z-index: 3;
  top: 5.7%;
  right: 6.5%;
  left: 6.5%;
  display: flex;
  align-items: center;
  color: rgba(51, 54, 55, .68);
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: clamp(7px, .66vw, 10px);
  letter-spacing: .13em;
}

.sheet-meta span:first-child {
  font-weight: 700;
}

.sheet-meta i {
  flex: 1;
  height: 1px;
  margin: 0 14px;
  background: rgba(53, 57, 58, .28);
}

.sheet-drawing {
  position: absolute;
  z-index: 2;
  inset: 7% 3% 3%;
  width: 94%;
  height: 90%;
}

.drawing-guides,
.drawing-object,
.drawing-checks,
.alignment-points {
  stroke: currentColor;
  vector-effect: non-scaling-stroke;
}

.drawing-guides {
  opacity: .26;
  stroke-width: .9;
}

.drawing-object {
  opacity: .68;
  stroke-width: 1.25;
}

.drawing-checks {
  opacity: calc(.28 + var(--scan-p) * .58);
  stroke-width: 1.5;
}

.alignment-points {
  opacity: calc(.28 + var(--scan-p) * .72);
  stroke-width: 1;
}

.scan-beam {
  position: absolute;
  z-index: 6;
  top: 10%;
  right: 4%;
  left: 4%;
  height: 44px;
  opacity: calc(.12 + (1 - var(--scan-p)) * .7);
  background: linear-gradient(180deg, transparent, rgba(231, 164, 55, .12), transparent);
  transform: translateY(calc(var(--scan-p) * 470px));
}

.scan-beam i {
  position: absolute;
  top: 21px;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(231, 164, 55, .88) 12% 88%, transparent);
  box-shadow: 0 0 14px rgba(231, 164, 55, .34);
}

.quality-mark {
  position: absolute;
  z-index: 8;
  right: 18%;
  bottom: 8.5%;
  display: grid;
  place-content: center;
  gap: 3px;
  width: calc(var(--stamp-width) * .82);
  height: calc(var(--stamp-width) * .2542);
  padding: 6px;
  border: clamp(2px, .2vw, 3px) solid rgba(53, 57, 58, .9);
  outline: 1px solid rgba(53, 57, 58, .72);
  outline-offset: -6px;
  color: rgba(42, 45, 46, .94);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(13px, 1.35vw, 20px);
  font-weight: 900;
  line-height: .92;
  letter-spacing: .055em;
  text-align: center;
  opacity: var(--mark-p);
  transform: scale(calc(.992 + var(--mark-p) * .008));
  transform-origin: center;
  filter: blur(calc((1 - var(--mark-p)) * .7px));
}

.mechanical-stamp {
  position: absolute;
  z-index: 7;
  right: calc(18% - var(--stamp-width) * .09);
  bottom: calc(8.5% + var(--stamp-width) * .1271);
  width: var(--stamp-width);
  height: calc(var(--stamp-width) * 1.62);
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .4));
  transform: translate3d(
    calc(((1 - var(--stamp-align)) * var(--stamp-approach)) + (var(--stamp-retreat) * var(--stamp-retreat-x)) - (var(--stamp-settle) * 3px)),
    calc((1 - var(--stamp-down) + var(--stamp-up)) * var(--stamp-lift) * -1 - (var(--stamp-retreat) * var(--stamp-retreat-y)) + (var(--stamp-settle) * 2px)),
    0
  ) rotate(calc(-5deg + (var(--stamp-align) * 5deg) + (var(--stamp-retreat) * 3deg) - (var(--stamp-settle) * .5deg)));
  transform-origin: 50% 100%;
}

.stamp-contact-shadow {
  position: absolute;
  z-index: 6;
  right: 18%;
  bottom: 8.5%;
  width: calc(var(--stamp-width) * .82);
  height: calc(var(--stamp-width) * .2542);
  border-radius: 50%;
  background: rgba(0, 0, 0, .54);
  opacity: calc((var(--contact-p) * .78) + (var(--stamp-down) * (1 - var(--stamp-up)) * .12));
  filter: blur(6px);
  transform: scale(calc(.88 + (var(--contact-p) * .12)), .32);
}

.stamp-handle-cap,
.stamp-handle,
.stamp-neck,
.stamp-collar,
.stamp-base {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background-color: #15191b;
}

.stamp-handle-cap {
  top: 0;
  width: 48%;
  height: 12%;
  border: 1px solid #596267;
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 25%, #51595d, #191d1f 40%, #060809 78%),
    #101315;
  box-shadow: 0 5px 0 #080a0b, 0 7px 1px #4f585d;
}

.stamp-handle {
  top: 5%;
  width: 40%;
  height: 42%;
  border: 1px solid #4d565b;
  border-radius: 42% 42% 28% 28% / 20% 20% 14% 14%;
  background:
    linear-gradient(90deg, #050607, #32383c 24%, #111416 54%, #3f474b 76%, #080a0b),
    #171b1d;
  box-shadow: inset 0 0 14px rgba(255, 255, 255, .06);
  transform: translate(-50%, calc(var(--stamp-load) * 4px));
}

.stamp-neck {
  top: 42%;
  width: 22%;
  height: 25%;
  border-right: 1px solid #535c61;
  border-left: 1px solid #202629;
  background: linear-gradient(90deg, #090b0c, #515a5e 38%, #15191b 67%, #030405);
  transform: translateX(-50%) scaleY(calc(1 - var(--stamp-load) * .07));
  transform-origin: center bottom;
}

.stamp-pressure-ring {
  position: absolute;
  top: 70%;
  left: 14%;
  width: 72%;
  height: 6%;
  border: 1px solid #a0afb6;
  border-radius: 50%;
  background: linear-gradient(180deg, #6f858f, #0c171d 38%, #9aadb6 60%, #15242c);
  transform: translateY(calc(var(--stamp-load) * 3px)) scaleY(calc(1 - var(--stamp-load) * .08));
}

.stamp-collar {
  height: 8%;
  border: 1px solid #586166;
  border-radius: 50%;
  background: linear-gradient(180deg, #4c555a, #111416 40%, #020304 72%, #31383b);
}

.stamp-collar-top {
  top: 61%;
  width: 52%;
}

.stamp-collar-bottom {
  top: 68%;
  width: 68%;
}

.stamp-base {
  bottom: 0;
  width: 82%;
  height: 28%;
  border: 1px solid #596267;
  border-radius: 50% 50% 11% 11% / 38% 38% 12% 12%;
  background:
    linear-gradient(90deg, #080a0b, #353c40 24%, #111416 52%, #515a5f 76%, #050607),
    #15191b;
  box-shadow: inset 0 -10px 0 #080a0b, inset 0 -12px 1px #697278;
  transform: translateX(-50%) scaleY(calc(1 - var(--stamp-load) * .045));
  transform-origin: center bottom;
}

.stamp-base::before {
  position: absolute;
  inset: 19% 8% 17%;
  border-radius: inherit;
  background: repeating-linear-gradient(90deg, transparent 0 4px, rgba(255, 255, 255, .07) 4px 5px);
  content: '';
  opacity: .42;
}

.stamp-base i {
  position: absolute;
  right: 9%;
  bottom: 7%;
  left: 9%;
  height: 10%;
  border-radius: 50%;
  background: #020304;
}

.quality-progress {
  position: absolute;
  z-index: 15;
  top: calc(var(--header-height, 76px) + 30px);
  right: 4vw;
  margin: 0;
  color: #737d82;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 9px;
  letter-spacing: .14em;
}

.quality-progress span {
  color: var(--amber, #e7a437);
}

.quality-context {
  display: grid;
  grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr);
  gap: clamp(40px, 8vw, 140px);
  align-content: center;
  min-height: 72svh;
  padding: 12vh var(--page-pad, 4vw);
  border-top: 1px solid var(--line, #252d32);
  background:
    linear-gradient(118deg, rgba(255, 255, 255, .025), transparent 44%),
    #050809;
}

.quality-context .section-label {
  align-self: start;
  margin-top: 14px;
}

.quality-context h2 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(48px, 6.5vw, 102px);
  font-weight: 400;
  line-height: .96;
  letter-spacing: -.055em;
}

.quality-context > p:last-child {
  grid-column: 2;
  max-width: 600px;
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid var(--line, #252d32);
  color: var(--muted, #a2a8ab);
  font-size: 18px;
  line-height: 1.6;
}

.quality-chapter-end {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto auto;
  gap: 22px;
  align-items: center;
  min-height: 150px;
  padding: 0 4vw;
  background: #030506;
  color: #7f898e;
  font-size: 13px;
}

.quality-chapter-end::before {
  display: none;
}

.quality-chapter-line {
  display: flex;
  align-items: center;
}

.quality-chapter-line::before {
  flex: none;
  width: 7px;
  height: 7px;
  border: 1px solid rgba(120, 132, 138, .68);
  border-radius: 50%;
  content: '';
}

.quality-chapter-line span {
  flex: 1;
  height: 1px;
  margin-left: 12px;
  background: linear-gradient(90deg, rgba(231, 164, 55, .48), rgba(87, 98, 104, .36));
  transform: scaleX(calc(.12 + (var(--continuation-p) * .88)));
  transform-origin: left;
}

.quality-chapter-end p {
  margin: 0;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.quality-chapter-end .chapter-link {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  color: var(--amber, #e7a437);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.quality-chapter-end .chapter-link strong {
  font-weight: 600;
}

.quality-chapter-end .chapter-link span {
  font-size: 24px;
  font-weight: 300;
  transition: transform 180ms ease;
}

.quality-chapter-end .chapter-link:hover span {
  transform: translateX(4px);
}

@media (max-width: 1100px) {
  .quality-copy {
    width: 34vw;
  }

  .quality-visual {
    left: 20vw;
  }

  .quality-object-plane {
    right: 4vw;
    width: 59vw;
  }
}

@media (max-width: 900px) {
  .header-crosshair {
    display: none;
  }

  .quality-story {
    height: auto;
    min-height: 940px;
  }

  .quality-js .quality-story {
    height: 185svh;
    min-height: 0;
  }

  .quality-sticky {
    position: relative;
    min-height: 940px;
  }

  .quality-js .quality-sticky {
    position: sticky;
    min-height: 100svh;
    height: 100svh;
  }

  .quality-copy {
    position: relative;
    top: auto;
    left: auto;
    width: auto;
    padding: calc(var(--header-height, 64px) + 46px) 22px 0;
  }

  .quality-copy h1 {
    font-size: clamp(54px, 14vw, 84px);
  }

  .quality-lead {
    margin-top: 23px;
    font-size: 17px;
  }

  .quality-visual {
    position: relative;
    inset: auto;
    min-height: clamp(340px, 56svh, 570px);
    margin-top: 38px;
  }

  .quality-space {
    top: -8%;
    right: -44%;
    width: 148%;
  }

  .quality-object-plane {
    --stamp-width: clamp(126px, 26vw, 192px);
    --stamp-lift: clamp(90px, 17vw, 122px);
    --stamp-approach: 36px;
    --stamp-retreat-x: 28px;
    --stamp-retreat-y: 28px;
    top: clamp(84px, 14svh, 130px);
    right: 6vw;
    width: 88vw;
    transform: translate3d(0, calc(var(--impact-p) * 1px), 0) rotateX(3deg) rotateY(-3deg) rotateZ(7deg);
  }

  .scan-beam {
    transform: translateY(300px);
  }

  .quality-mark {
    font-size: clamp(10px, 1.9vw, 15px);
    outline-offset: -4px;
  }

  .quality-progress {
    top: calc(var(--header-height, 64px) + 22px);
    right: 22px;
  }

  .quality-scene-caption {
    right: 22px;
    bottom: 24px;
    font-size: 9px;
  }

  .quality-chapter-end {
    grid-template-columns: minmax(42px, 1fr) auto auto;
    gap: 12px;
    min-height: 122px;
    padding: 0 22px;
    font-size: 11px;
  }

  .quality-context {
    grid-template-columns: 1fr;
    gap: 32px;
    min-height: auto;
    padding: 96px 22px;
  }

  .quality-context .section-label {
    margin-top: 0;
  }

  .quality-context h2 {
    font-size: clamp(42px, 11.5vw, 62px);
  }

  .quality-context > p:last-child {
    grid-column: 1;
    font-size: 16px;
  }
}

@media (max-width: 520px) {
  .quality-sticky {
    min-height: 900px;
  }

  .quality-copy {
    padding-right: 20px;
    padding-left: 20px;
  }

  .quality-copy h1 {
    font-size: clamp(48px, 14vw, 62px);
  }

  .quality-object-plane {
    --stamp-width: 140px;
  }

  .quality-chapter-end .chapter-link {
    gap: 7px;
    font-size: 13px;
  }

  .quality-chapter-end p {
    font-size: 8px;
  }
}

html.runtime-lite .quality-page .quality-space,
html.runtime-lite .quality-page .drawing-guides,
html.runtime-lite .quality-page .alignment-points {
  display: none;
}

html.runtime-lite .quality-page .mechanical-stamp,
html.runtime-lite .quality-page .stamp-contact-shadow,
html.runtime-lite .quality-page .quality-mark {
  filter: none;
}

html.runtime-lite .quality-page .technical-sheet {
  box-shadow: 0 18px 28px rgba(0, 0, 0, .42);
}

html.runtime-lite .quality-page .technical-sheet::before {
  mix-blend-mode: normal;
}

html.runtime-lite .quality-page .scan-beam i {
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  .quality-js .quality-story,
  .quality-story {
    --quality-p: 1;
    --scan-p: 1;
    --stamp-align: 1;
    --stamp-down: 1;
    --stamp-up: 1;
    --stamp-retreat: 1;
    --stamp-settle: 1;
    --impact-p: 0;
    --contact-p: 0;
    --mark-p: 1;
    height: auto;
    min-height: 100svh;
  }

  .quality-js .quality-sticky,
  .quality-sticky {
    position: relative;
    height: auto;
    min-height: 100svh;
  }

  .scan-beam {
    opacity: .08;
  }
}

html[data-motion='reduce'] .quality-story {
  --quality-p: 1;
  --scan-p: 1;
  --stamp-align: 1;
  --stamp-down: 1;
  --stamp-up: 1;
  --stamp-retreat: 1;
  --stamp-settle: 1;
  --impact-p: 0;
  --contact-p: 0;
  --mark-p: 1;
  height: auto;
  min-height: 100svh;
}

html[data-motion='reduce'] .quality-sticky {
  position: relative;
  height: auto;
  min-height: 100svh;
}

html[data-motion='reduce'] .scan-beam {
  opacity: .08;
}
