/* Doc alone owns this short closing sequence. The rest of the site is untouched. */
.footer-track.has-sentient-face.doc-cinematic-track:has(.doc-presence) {
  height: auto;
  min-height: 0;
  overflow: clip;
}
.footer-track.has-sentient-face.doc-cinematic-track:has(.doc-presence) .footer.local-scene {
  position: relative;
  top: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  align-items: start;
  row-gap: 18px;
  min-height: 820px;
  height: auto;
  padding: 105px calc(var(--gutter) + 48%) 95px var(--gutter);
  overflow: clip;
  background: radial-gradient(ellipse at 79% 37%, #8f79551d, transparent 48%), #151712;
}
.footer-track.has-sentient-face.doc-cinematic-track .footer.local-scene .doc-scene-intro {
  position: relative;
  z-index: 4;
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  margin-bottom: 30px;
  opacity: 1;
  transform: none;
}
.doc-cinematic-track .doc-scene-intro > .eyebrow {
  display: block;
  color: #bca47e;
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: .16em;
}
.doc-cinematic-track .doc-scene-intro h2 {
  margin: 20px 0 22px;
  color: #ede5d5;
  font: 400 clamp(48px, 4.8vw, 76px)/.99 var(--serif);
  letter-spacing: -.045em;
}
.doc-cinematic-track .doc-reveal-mask,
.doc-cinematic-track .doc-reveal-line {
  display: block;
  overflow: visible;
}
.doc-cinematic-track .doc-reveal-line {
  padding: 0 .1em .13em 0;
  margin-bottom: -.13em;
  opacity: 1;
  transform: none;
  filter: none;
}
.doc-cinematic-track .doc-reveal-line:nth-child(3),
.doc-cinematic-track .doc-reveal-mask:last-child .doc-reveal-line { color: #d0b78d; }
.doc-cinematic-track .doc-scene-intro > p {
  max-width: 280px;
  margin: 0;
  color: #b4b6a5;
  font-size: 13px;
  line-height: 1.7;
}
.doc-cinematic-track .doc-scene-chapters {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 22px;
  opacity: 1;
  transform: none;
}
.doc-cinematic-track .doc-scene-chapters button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid #a38d6552;
  border-radius: 5px;
  background: #a38d650a;
  color: #c4c0b0;
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: .015em;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
  touch-action: manipulation;
}
.doc-cinematic-track .doc-scene-chapters button[aria-current="step"] {
  border-color: #c6ab7b9c;
  background: #b7a06b22;
  color: #ead8b5;
}
.doc-cinematic-track .doc-scene-chapters button:focus-visible {
  outline: 2px solid #e7c99b;
  outline-offset: 4px;
}
.footer-track.has-sentient-face.doc-cinematic-track:has(.doc-presence) .footer.local-scene .doc-presence {
  position: absolute;
  top: 50%;
  right: var(--gutter);
  width: 44%;
  margin: 0;
  scroll-margin-top: 110px;
  opacity: 1;
  transform: translateY(-50%);
}
.footer-track.has-sentient-face.doc-cinematic-track .doc-presence .sentient-face-visual {
  height: clamp(260px, 34svh, 340px);
}
.footer-track.has-sentient-face.doc-cinematic-track .doc-presence .doc-hud {
  opacity: 1;
  transform: none;
}
.footer-track.has-sentient-face.doc-cinematic-track:has(.doc-presence) .footer.local-scene .wordmark {
  position: relative;
  grid-column: 1;
  grid-row: 2;
  margin-bottom: 0;
  font-size: clamp(32px, 3.6vw, 49px);
  line-height: 1.08;
  opacity: 1;
  transform: none;
}
.footer-track.has-sentient-face.doc-cinematic-track:has(.doc-presence) .footer.local-scene .footer-name-reform {
  position: relative;
  grid-column: 1;
  grid-row: 3;
  justify-self: start;
  margin: 0;
  opacity: 1;
  transform: none;
}
.footer-track.has-sentient-face.doc-cinematic-track:has(.doc-presence) .footer.local-scene .copyright {
  position: relative;
  grid-column: 1;
  grid-row: 4;
  opacity: 1;
  transform: none;
}
.footer-track.has-sentient-face.doc-cinematic-track:has(.doc-presence) .footer.local-scene .footer-links {
  position: relative;
  grid-column: 1;
  grid-row: 5;
  justify-self: start;
  opacity: 1;
  transform: none;
}

/* One native sticky composition, with less than one viewport of extra travel. */
@media (min-width: 901px) and (min-height: 760px) and (prefers-reduced-motion: no-preference) {
  html:not(.motion-paused) .footer-track.has-sentient-face.doc-cinematic-track.doc-cinematic-enabled {
    height: 190svh;
    min-height: 0;
  }
  html:not(.motion-paused) .footer-track.has-sentient-face.doc-cinematic-track.doc-cinematic-enabled .footer.local-scene {
    position: sticky;
    top: 0;
    display: block;
    height: 100svh;
    min-height: 0;
    padding: 0;
    overflow: clip;
  }
  html:not(.motion-paused) .footer-track.has-sentient-face.doc-cinematic-track.doc-cinematic-enabled .footer.local-scene .doc-scene-intro {
    position: absolute;
    top: max(110px, 14svh);
    left: var(--gutter);
    width: 41%;
    margin: 0;
    transform: translate3d(0, calc(var(--doc-scene-progress, 0) * -12px), 0);
  }
  html:not(.motion-paused) .doc-cinematic-track.doc-cinematic-enabled .doc-scene-intro h2 {
    margin-top: 19px;
    margin-bottom: 22px;
    font-size: clamp(54px, 5.5vw, 82px);
  }
  html:not(.motion-paused) .doc-cinematic-track.doc-cinematic-enabled .doc-reveal-mask {
    padding-bottom: .13em;
    margin-bottom: -.13em;
    overflow: clip;
  }
  html:not(.motion-paused) .doc-cinematic-track.doc-cinematic-enabled .doc-reveal-line {
    transform: translate3d(0, calc((1 - var(--doc-line-reveal, 1)) * 110%), 0);
  }
  html:not(.motion-paused) .footer-track.has-sentient-face.doc-cinematic-track.doc-cinematic-enabled .footer.local-scene .doc-presence {
    top: calc(50% + 10px);
    right: var(--gutter);
    width: 44%;
    transform: translateY(-50%);
  }
  html:not(.motion-paused) .footer-track.has-sentient-face.doc-cinematic-track.doc-cinematic-enabled .doc-presence .doc-hud {
    opacity: calc(.88 + var(--doc-hud-reveal, 0) * .12);
    transform: translate3d(0, calc((1 - var(--doc-hud-reveal, 0)) * 9px), 0);
  }
  html:not(.motion-paused) .footer-track.has-sentient-face.doc-cinematic-track.doc-cinematic-enabled .doc-presence:is([data-game="playing"], [data-game="paused"]) .doc-hud {
    opacity: 1;
    transform: none;
  }
  html:not(.motion-paused) .footer-track.has-sentient-face.doc-cinematic-track.doc-cinematic-enabled .footer.local-scene .wordmark {
    position: absolute;
    bottom: 200px;
    left: var(--gutter);
    max-width: 42%;
    margin: 0;
    font-size: clamp(32px, 3.6vw, 49px);
  }
  html:not(.motion-paused) .footer-track.has-sentient-face.doc-cinematic-track.doc-cinematic-enabled .footer.local-scene .footer-name-reform {
    position: absolute;
    bottom: 145px;
    left: var(--gutter);
  }
  html:not(.motion-paused) .footer-track.has-sentient-face.doc-cinematic-track.doc-cinematic-enabled .footer.local-scene .copyright {
    position: absolute;
    bottom: 108px;
    left: var(--gutter);
    max-width: 42%;
  }
  html:not(.motion-paused) .footer-track.has-sentient-face.doc-cinematic-track.doc-cinematic-enabled .footer.local-scene .footer-links {
    position: absolute;
    bottom: 50px;
    left: var(--gutter);
    max-width: 42%;
  }
  html:not(.motion-paused) .doc-cinematic-track.doc-cinematic-enabled .footer > .doc-scene-chapters {
    position: absolute;
    left: var(--gutter);
    bottom: 265px;
    width: 42%;
    margin: 0;
  }
}

@media (hover: hover) and (pointer: fine) {
  .doc-cinematic-track .doc-scene-chapters button:hover {
    border-color: #cfb78b;
    background: #b7a06b29;
    color: #f0dfbd;
  }
}
/* Tablets and phones read as an introduction followed by the full playable Doc. */
@media (max-width: 900px) {
  .footer-track.has-sentient-face.doc-cinematic-track:has(.doc-presence),
  .footer-track.has-sentient-face.doc-cinematic-track:has(.doc-presence).local-motion {
    height: auto;
    min-height: 0;
  }
  .footer-track.has-sentient-face.doc-cinematic-track:has(.doc-presence) .footer.local-scene {
    position: relative;
    top: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    row-gap: 20px;
    height: auto;
    min-height: 0;
    padding: 65px var(--gutter) max(95px, env(safe-area-inset-bottom));
    overflow: clip;
  }
  .footer-track.has-sentient-face.doc-cinematic-track .footer.local-scene .doc-scene-intro {
    grid-row: 1;
    margin-bottom: 12px;
  }
  .doc-cinematic-track .doc-scene-intro h2 { font-size: clamp(43px, 8.7vw, 66px); }
  .doc-cinematic-track .doc-scene-intro > p { font-size: 13px; }
  .doc-cinematic-track .doc-scene-chapters { gap: 7px; margin-top: 18px; }
  .doc-cinematic-track .doc-scene-chapters button { min-height: 44px; font-size: 11px; padding-inline: 10px; }
  .footer-track.has-sentient-face.doc-cinematic-track:has(.doc-presence) .footer.local-scene .doc-presence {
    position: relative;
    grid-column: 1;
    grid-row: 2;
    top: auto;
    right: auto;
    width: 100%;
    height: auto;
    scroll-margin-top: 20px;
    transform: none;
  }
  .footer-track.has-sentient-face.doc-cinematic-track .doc-presence .sentient-face-visual { height: clamp(245px, 35svh, 340px); }
  .footer-track.has-sentient-face.doc-cinematic-track:has(.doc-presence) .footer.local-scene .wordmark { grid-row: 3; }
  .footer-track.has-sentient-face.doc-cinematic-track:has(.doc-presence) .footer.local-scene .footer-name-reform { grid-row: 4; }
  .footer-track.has-sentient-face.doc-cinematic-track:has(.doc-presence) .footer.local-scene .copyright { grid-row: 5; }
  .footer-track.has-sentient-face.doc-cinematic-track:has(.doc-presence) .footer.local-scene .footer-links { grid-row: 6; }
}
@media (max-width: 430px) {
  .doc-cinematic-track .doc-scene-intro h2 { font-size: 45px; }
  .footer-track.has-sentient-face.doc-cinematic-track:has(.doc-presence) .footer.local-scene { padding-top: 55px; }
}
.motion-paused .doc-cinematic-track .doc-reveal-line,
.motion-paused .doc-cinematic-track .doc-scene-intro,
.motion-paused .doc-cinematic-track .doc-hud { opacity: 1; transform: none; }
.motion-paused .doc-cinematic-track .doc-reveal-mask { overflow: visible; }
.motion-paused .doc-cinematic-track .doc-scene-chapters button { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .doc-cinematic-track .doc-reveal-line,
  .doc-cinematic-track .doc-scene-intro,
  .doc-cinematic-track .doc-hud { opacity: 1; transform: none; }
  .doc-cinematic-track .doc-reveal-mask { overflow: visible; }
  .doc-cinematic-track .doc-scene-chapters button { transition: none; }
}
@media (forced-colors: active) {
  .doc-cinematic-track .doc-scene-chapters button { color: ButtonText; border-color: ButtonText; background: ButtonFace; }
  .doc-cinematic-track .doc-scene-chapters button:focus-visible { outline-color: Highlight; }
}

.doc-cinematic-track .footer-name-reform[hidden] { display: none !important; }
