/* Nio-inspired Oshi direction: deeper night color, deliberate framing, and visible page reveals. */
:root {
  --oshi-shared-background: linear-gradient(180deg, #050608 0%, #141b35 50.86%, #050608 100%);
  --oshi-motion-enter: 680ms;
}

/* Paint the page root as well as the body so header margins cannot expose a black seam. */
html:not(.preview-embed) {
  min-height: 100%;
  background: var(--oshi-shared-background) fixed;
}
html:not(.preview-embed) body {
  background: var(--oshi-shared-background) fixed !important;
}

/* Keep Oshi's existing wordmark, with the light corner framing used by the reference. */
.global-header.v35-site-header::before,
.global-header.v35-site-header::after {
  display: block !important;
  content: "" !important;
}
.global-header.v35-site-header::before { border: 0 !important; }
.global-header.v35-site-header::after { opacity: .72; }

/* Match the reference's lighter display hierarchy on the directory and release history. */
.page-modules .modules-copy h1,
.changelog-page .changelog-heading h1 {
  font-size: clamp(56px, 4.5vw, 72px);
  font-weight: 400;
}

/* Use the existing reveal observer with a clearer, still compact entrance. */
html.motion-ready [data-v35-reveal],
html.motion-ready [data-reveal] {
  transition-property: opacity, transform;
  transition-duration: var(--oshi-motion-enter);
  transition-timing-function: var(--oshi-motion-ease);
}
html.motion-ready [data-v35-reveal]:not(.is-visible),
html.motion-ready [data-reveal]:not(.is-visible) {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
}
html.motion-ready [data-v35-reveal="heading"]:not(.is-visible) { transform: translate3d(0, 28px, 0); }
html.motion-ready [data-v35-reveal="left"]:not(.is-visible) { transform: translate3d(-20px, 12px, 0); }
html.motion-ready [data-v35-reveal="right"]:not(.is-visible) { transform: translate3d(20px, 12px, 0); }
html.motion-ready [data-v35-reveal].is-visible,
html.motion-ready [data-reveal].is-visible { opacity: 1; transform: none; }
html.motion-ready [data-v35-reveal="stagger"] > *,
html.motion-ready [data-reveal="stagger"] > * {
  transition-property: opacity, transform;
  transition-duration: 560ms;
  transition-timing-function: var(--oshi-motion-ease);
}
html.motion-ready [data-v35-reveal="stagger"]:not(.is-visible) > *,
html.motion-ready [data-reveal="stagger"]:not(.is-visible) > * {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
}
html.motion-ready [data-v35-reveal="stagger"] > *:nth-child(2),
html.motion-ready [data-reveal="stagger"] > *:nth-child(2) { transition-delay: 70ms; }
html.motion-ready [data-v35-reveal="stagger"] > *:nth-child(3),
html.motion-ready [data-reveal="stagger"] > *:nth-child(3) { transition-delay: 140ms; }
html.motion-ready [data-v35-reveal="stagger"] > *:nth-child(4),
html.motion-ready [data-reveal="stagger"] > *:nth-child(4) { transition-delay: 210ms; }
html.motion-ready [data-v35-reveal="stagger"] > *:nth-child(n+5),
html.motion-ready [data-reveal="stagger"] > *:nth-child(n+5) { transition-delay: 250ms; }

@media (max-width: 680px) {
  .page-modules .modules-copy h1,
  .changelog-page .changelog-heading h1 { font-size: clamp(38px, 10vw, 46px); }
}
