/* Interaction and language-specific optical corrections */
html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  scroll-padding-top: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

html.chapter-scroll-active {
  scroll-behavior: auto;
  scroll-snap-type: none;
}

main > .hero,
main > .section {
  scroll-margin-top: 0;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}

.site-footer {
  scroll-snap-align: end;
  scroll-snap-stop: normal;
}

.hero {
  padding-bottom: 58px;
}

.hero-ticker {
  position: absolute;
  z-index: 3;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 28px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 500 8px/1 var(--display);
  letter-spacing: .2em;
  white-space: nowrap;
}

.hero-ticker > div {
  min-width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  animation: tickerMove 24s linear infinite;
}

.hero-ticker i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

@keyframes tickerMove {
  to { transform: translateX(-100%); }
}

.site-nav a[aria-current="true"] {
  opacity: 1;
}

.site-nav a[aria-current="true"]::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin: 0 7px 2px 0;
  border-radius: 50%;
  background: currentColor;
}

.about-content h2,
.current-heading h2 {
  text-wrap: balance;
}

.about-copy {
  text-wrap: pretty;
}

.facts dd,
.current-list b {
  white-space: nowrap;
}

.language-pulse main {
  animation: languageIn .36s cubic-bezier(.2,.8,.2,1);
}

@keyframes languageIn {
  from { opacity: .35; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

html:lang(en) .about-content h2 { max-width: 880px; }
html:lang(en) .about-copy { max-width: 620px; }
html:lang(ja) .about-content h2 { max-width: 900px; }
html:lang(ja) .about-copy { max-width: 620px; }
html:lang(ja) .facts dt { letter-spacing: .02em; }

@media (max-width: 760px) {
  html { scroll-snap-type: none; }
  .hero { padding-bottom: 48px; }
  .hero-ticker { height: 24px; }
  .hero-ticker > div { min-width: 165%; }
  .site-nav a[aria-current="true"]::before { width: 5px; height: 5px; margin-bottom: 5px; }
  html:lang(en) .about-content h2 { max-width: 95%; }
  html:lang(ja) .about-content h2 { max-width: 96%; }
  html:lang(en) .current-list h3 { font-size: 10.7vw; }
  html:lang(ja) .current-list h3 { font-size: 10.3vw; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-ticker > div { animation-play-state: paused; }
  .language-pulse main { animation: none; }
}
